public interface FileSystemManagementSession extends OsidSession
This session defines methods for operating on files and directories.
This session is an expanded version of the DirectoryAdminSession
that defines methods requiring path names for navigating a
federation of directories as opposed to working within a single directory
node.
The directory associated with this session is the current working directory and any relative path names provided are with respect to this directory. Absolute pathnames may be supplied outside this directory.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canManageFiling()
Tests if this user can perform functions in this session.
|
Directory |
copyDirectory(Id src,
java.lang.String dst)
Copies a directory and all of its contents to another path.
|
File |
copyFile(Id src,
java.lang.String dst)
Copies a file to another path.
|
void |
createMissingPaths(boolean create)
Create any missing directories for a destination path that does not
exist.
|
Directory |
getDirectory()
Gets the directory associated with this session.
|
Id |
getDirectoryId()
Gets the
Id of this directory. |
Directory |
linkDirectory(Id directoryId,
java.lang.String link)
Creates a link from one directory to another.
|
File |
linkFile(Id fileId,
java.lang.String link)
Creates a link from one file to another.
|
void |
moveDirectory(Id src,
java.lang.String dst)
Moves a directory to another path.
|
void |
moveFile(Id src,
java.lang.String dst)
Moves a file to another path.
|
void |
overwrite(boolean overwite)
Overwrite files if a destination pathname exists.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getDirectoryId()
Id of this directory. Id of this directorymandatory - This method must be implemented. Directory getDirectory() throws OperationFailedException, PermissionDeniedException
OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canManageFiling()
PERMISSION_DENIED. This is intended as a hint to an
application that may opt not to offer lookup operations to
unauthorized users. false if filing management methods are not
authorized, true otherwisemandatory - This method must be implemented. void overwrite(boolean overwite)
overwite - true if files can be overwritten,
false otherwisemandatory - This method is must be implemented. void createMissingPaths(boolean create)
create - true if intermediate directories should
be created, false otherwisemandatory - This method is must be implemented. void moveFile(Id src, java.lang.String dst) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
overwrite() is true. If
the destination is a directory and does not exist, the missing
directories are only created if createMissingPaths() is
true. src - the source Id of the filedst - the destination name or path of the directory or fileAlreadyExistsException - dst exists and
overwrite() is false InvalidArgumentException - src is not a
fileNotFoundException - src is not found, or
the path to dst is not found and
createMissingPaths() is false NullArgumentException - src or
dst is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. void moveDirectory(Id src, java.lang.String dst) throws NotFoundException, OperationFailedException, PermissionDeniedException
createMissingPaths() is true.
src - the source Id of the directorydst - the destination name or path of the directoryInvalidArgumentException - src is not a
directoryNotFoundException - src is not found, or
the path to dst is not found and
createMissingPaths() is false NullArgumentException - src or
dst is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. File copyFile(Id src, java.lang.String dst) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
overwrite() is true. If
the destination is a directory and does not exist, the missing
directories are only created if createMissingPaths() is
true. src - the source Id of the filedst - the destination name or path of the directory or fileAlreadyExistsException - dst exists and
overwrite() is false InvalidArgumentException - src is not a
fileNotFoundException - src is not found, or
the path to dst is not found and
createMissingPaths() is false NullArgumentException - src or
dst is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. Directory copyDirectory(Id src, java.lang.String dst) throws NotFoundException, OperationFailedException, PermissionDeniedException
createMissingPaths() is true. src - the source Id of the directorydst - the destination name or path of the directoryInvalidArgumentException - src is not a
directoryNotFoundException - src is not found, or
the path to dst is not found and
createMissingPaths() is false NullArgumentException - src or
dst is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. File linkFile(Id fileId, java.lang.String link) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
fileId - the Id of a filelink - the link pathAlreadyExistsException - link already
existsNotFoundException - fileId is not found,
or the path to link is not found and
createMissingPaths() is false NullArgumentException - fileId or
link is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. Directory linkDirectory(Id directoryId, java.lang.String link) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
directoryId - the Id of a directorylink - the destination pathAlreadyExistsException - link already
existsNotFoundException - directoryId is not
found, or the path to link is not found and
createMissingPaths() is false NullArgumentException - directoryId or
link is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.