Package org.irods.irods4j.high_level.vfs
Class IRODSFilesystem
java.lang.Object
org.irods.irods4j.high_level.vfs.IRODSFilesystem
A class providing high-level functions for working with collections and data
objects.
- Since:
- 0.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classDefines bitmask values which influence the behavior of a copy operation.static enumDefines values which influence the behavior of a remove operation. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcopy(IRODSApi.RcComm comm, String from, String to) static voidcopy(IRODSApi.RcComm comm, String from, String to, int copyOptions) static booleancopyDataObject(IRODSApi.RcComm comm, String from, String to) static booleancopyDataObject(IRODSApi.RcComm comm, String from, String to, int copyOptions) static booleancreateCollection(IRODSApi.RcComm comm, String path) static booleancreateCollection(IRODSApi.RcComm comm, String path, String existingPath) static booleancreateCollections(IRODSApi.RcComm comm, String path) static StringdataObjectChecksum(IRODSApi.RcComm comm, String path) TODOstatic longdataObjectSize(IRODSApi.RcComm comm, String path) static voidenableInheritance(AdminTag adminTag, IRODSApi.RcComm comm, String path, boolean enable) TODOstatic voidenableInheritance(IRODSApi.RcComm comm, String path, boolean enable) TODOstatic booleanequivalent(IRODSApi.RcComm comm, String path1, String path2) static booleanexists(ObjectStatus status) Checks if a filesystem object is known to the catalog.static booleanexists(IRODSApi.RcComm comm, String path) Checks if a filesystem object is known to the catalog.static booleanisCollection(ObjectStatus status) Checks if the filesystem object is a collection.static booleanisCollection(IRODSApi.RcComm comm, String path) static booleanisCollectionRegistered(IRODSApi.RcComm comm, String path) static booleanisDataObject(ObjectStatus status) static booleanisDataObject(IRODSApi.RcComm comm, String path) static booleanisDataObjectRegistered(IRODSApi.RcComm comm, String path) static booleanisEmpty(IRODSApi.RcComm comm, String path) static booleanisOther(ObjectStatus status) static booleanisOther(IRODSApi.RcComm comm, String path) static booleanisSpecialCollection(IRODSApi.RcComm comm, String path) static longlastWriteTime(IRODSApi.RcComm comm, String path) Returns the time of the last modification to a filesystem object as epoch seconds.static voidlastWriteTime(IRODSApi.RcComm comm, String path, long newModifyTime) static voidpermissions(AdminTag adminTag, IRODSApi.RcComm comm, String path, String userOrGroup, Permission prms) static voidpermissions(IRODSApi.RcComm comm, String path, String userOrGroup, Permission prms) static booleanremove(IRODSApi.RcComm comm, String path) static booleanremove(IRODSApi.RcComm comm, String path, IRODSFilesystem.RemoveOptions removeOptions) static voidremoveAll(IRODSApi.RcComm comm, String path) static voidremoveAll(IRODSApi.RcComm comm, String path, IRODSFilesystem.RemoveOptions removeOptions) static voidrename(IRODSApi.RcComm comm, String oldPath, String newPath) static ObjectStatusstatus(IRODSApi.RcComm comm, String path) TODOstatic booleanstatusKnown(ObjectStatus status) Checks if the filesystem object's type is known.
-
Field Details
-
asAdmin
Instructs the server to execute operations using rodsadmin level privileges.- Since:
- 0.1.0
-
-
Constructor Details
-
IRODSFilesystem
public IRODSFilesystem()
-
-
Method Details
-
copy
public static void copy(IRODSApi.RcComm comm, String from, String to, int copyOptions) throws IRODSFilesystemException, IOException, IRODSException - Parameters:
comm-from-to-copyOptions-- Throws:
IRODSFilesystemExceptionIOExceptionIRODSException- Since:
- 0.1.0
-
copy
public static void copy(IRODSApi.RcComm comm, String from, String to) throws IRODSFilesystemException, IOException, IRODSException - Parameters:
comm-from-to-- Throws:
IRODSFilesystemExceptionIOExceptionIRODSException- Since:
- 0.1.0
-
copyDataObject
public static boolean copyDataObject(IRODSApi.RcComm comm, String from, String to, int copyOptions) throws IRODSFilesystemException, IOException, IRODSException - Parameters:
comm-from-to-copyOptions-- Returns:
- Throws:
IRODSFilesystemExceptionIOExceptionIRODSException- Since:
- 0.1.0
-
copyDataObject
public static boolean copyDataObject(IRODSApi.RcComm comm, String from, String to) throws IRODSFilesystemException, IOException, IRODSException - Parameters:
comm-from-to-- Returns:
- Throws:
IRODSFilesystemExceptionIOExceptionIRODSException- Since:
- 0.1.0
-
createCollection
public static boolean createCollection(IRODSApi.RcComm comm, String path) throws IOException, IRODSFilesystemException - Parameters:
comm-path-- Returns:
- Throws:
IOExceptionIRODSFilesystemException- Since:
- 0.1.0
-
createCollection
public static boolean createCollection(IRODSApi.RcComm comm, String path, String existingPath) throws IRODSFilesystemException, IOException, IRODSException - Parameters:
comm-path-existingPath-- Returns:
- Throws:
IRODSFilesystemExceptionIOExceptionIRODSException- Since:
- 0.1.0
-
createCollections
public static boolean createCollections(IRODSApi.RcComm comm, String path) throws IRODSFilesystemException, IOException, IRODSException - Parameters:
comm-path-- Returns:
- Throws:
IRODSFilesystemExceptionIOExceptionIRODSException- Since:
- 0.1.0
-
exists
Checks if a filesystem object is known to the catalog.- Parameters:
status- TheObjectStatusof the filesystem object.- Since:
- 0.1.0
-
exists
public static boolean exists(IRODSApi.RcComm comm, String path) throws IRODSFilesystemException, IOException, IRODSException Checks if a filesystem object is known to the catalog.- Parameters:
comm- A connection to the iRODS server.path- A path identifying the filesystem object.- Throws:
IRODSFilesystemExceptionIOExceptionIRODSException- Since:
- 0.1.0
-
isCollectionRegistered
public static boolean isCollectionRegistered(IRODSApi.RcComm comm, String path) throws IOException, IRODSException - Parameters:
comm-path-- Returns:
- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
isDataObjectRegistered
public static boolean isDataObjectRegistered(IRODSApi.RcComm comm, String path) throws IOException, IRODSException - Parameters:
comm-path-- Returns:
- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
equivalent
public static boolean equivalent(IRODSApi.RcComm comm, String path1, String path2) throws IOException, IRODSException - Parameters:
comm-path1-path2-- Returns:
- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
dataObjectSize
public static long dataObjectSize(IRODSApi.RcComm comm, String path) throws IRODSFilesystemException, IOException, IRODSException - Parameters:
comm-path-- Returns:
- Throws:
IRODSFilesystemExceptionIOExceptionIRODSException- Since:
- 0.1.0
-
isCollection
Checks if the filesystem object is a collection.- Parameters:
status- TheObjectStatusof the filesystem object.- Since:
- 0.1.0
-
isCollection
public static boolean isCollection(IRODSApi.RcComm comm, String path) throws IRODSFilesystemException, IOException, IRODSException - Parameters:
comm-path-- Returns:
- Throws:
IRODSFilesystemExceptionIOExceptionIRODSException- Since:
- 0.1.0
-
isDataObject
- Parameters:
status-- Since:
- 0.1.0
-
isDataObject
public static boolean isDataObject(IRODSApi.RcComm comm, String path) throws IRODSFilesystemException, IOException, IRODSException - Parameters:
comm-path-- Returns:
- Throws:
IRODSFilesystemExceptionIOExceptionIRODSException- Since:
- 0.1.0
-
isOther
- Parameters:
status-- Since:
- 0.1.0
-
isOther
public static boolean isOther(IRODSApi.RcComm comm, String path) throws IRODSFilesystemException, IOException, IRODSException - Parameters:
comm-path-- Returns:
- Throws:
IRODSFilesystemExceptionIOExceptionIRODSException- Since:
- 0.1.0
-
isSpecialCollection
public static boolean isSpecialCollection(IRODSApi.RcComm comm, String path) throws IOException, IRODSException - Parameters:
comm-path-- Returns:
- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
isEmpty
public static boolean isEmpty(IRODSApi.RcComm comm, String path) throws IRODSFilesystemException, IOException, IRODSException - Parameters:
comm-path-- Returns:
- Throws:
IRODSFilesystemExceptionIOExceptionIRODSException- Since:
- 0.1.0
-
lastWriteTime
public static long lastWriteTime(IRODSApi.RcComm comm, String path) throws IRODSFilesystemException, IOException, IRODSException Returns the time of the last modification to a filesystem object as epoch seconds. If the filesystem object identifies a data object, only good replicas will be considered. If no good replicas exists, an exception will be thrown.- Parameters:
comm- A connection to the iRODS server.path- The logical path identifying a collection or data object.- Returns:
- The modification time as seconds since epoch.
- Throws:
IRODSFilesystemExceptionIOExceptionIRODSException- Since:
- 0.1.0
-
lastWriteTime
public static void lastWriteTime(IRODSApi.RcComm comm, String path, long newModifyTime) throws IOException, IRODSException - Parameters:
comm-path-newModifyTime-- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
remove
public static boolean remove(IRODSApi.RcComm comm, String path, IRODSFilesystem.RemoveOptions removeOptions) throws IOException, IRODSException - Parameters:
comm-path-removeOptions-- Returns:
- Throws:
IOExceptionIRODSException
-
remove
- Parameters:
comm-path-- Returns:
- Throws:
IOExceptionIRODSException
-
removeAll
public static void removeAll(IRODSApi.RcComm comm, String path, IRODSFilesystem.RemoveOptions removeOptions) throws IOException, IRODSException - Parameters:
comm-path-removeOptions-- Throws:
IOExceptionIRODSException
-
removeAll
- Parameters:
comm-path-- Throws:
IOExceptionIRODSException
-
permissions
public static void permissions(IRODSApi.RcComm comm, String path, String userOrGroup, Permission prms) throws IRODSFilesystemException, IOException - Parameters:
comm-path-userOrGroup-prms-- Throws:
IRODSFilesystemExceptionIOException- Since:
- 0.1.0
-
permissions
public static void permissions(AdminTag adminTag, IRODSApi.RcComm comm, String path, String userOrGroup, Permission prms) throws IRODSFilesystemException, IOException - Parameters:
adminTag-comm-path-userOrGroup-prms-- Throws:
IRODSFilesystemExceptionIOException- Since:
- 0.1.0
-
enableInheritance
public static void enableInheritance(IRODSApi.RcComm comm, String path, boolean enable) throws IOException, IRODSException TODO- Parameters:
comm-path-enable-- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
enableInheritance
public static void enableInheritance(AdminTag adminTag, IRODSApi.RcComm comm, String path, boolean enable) throws IOException, IRODSException TODO- Parameters:
adminTag-comm-path-enable-- Throws:
IOExceptionIRODSException- Since:
- 0.1.0
-
rename
public static void rename(IRODSApi.RcComm comm, String oldPath, String newPath) throws IOException, IRODSException - Throws:
IOExceptionIRODSException
-
status
public static ObjectStatus status(IRODSApi.RcComm comm, String path) throws IOException, IRODSException, IRODSFilesystemException TODO- Parameters:
comm-path-- Returns:
- Throws:
IOExceptionIRODSExceptionIRODSFilesystemException- Since:
- 0.1.0
-
statusKnown
Checks if the filesystem object's type is known.- Parameters:
status- The filesystem object's status.- Since:
- 0.1.0
-
dataObjectChecksum
public static String dataObjectChecksum(IRODSApi.RcComm comm, String path) throws IRODSFilesystemException, NumberFormatException, IOException, IRODSException TODO- Parameters:
comm-path-- Returns:
- Throws:
IRODSFilesystemExceptionIRODSExceptionIOExceptionNumberFormatException- Since:
- 0.1.0
-