Interface | osid.filing.FileSystemSession | ||
---|---|---|---|
Implements | osid.OsidSession | ||
Description |
This session defines methods for examining file systems. A
This session defines the following views:
Generally, the comparative view should be used for most applications as it permits operation even if there is data out of sync. Some administrative applications may need to know whether it had retrieved an entire set of objects and may sacrifice some interoperability for the sake of precision using the plenary view. | ||
Method | getDirectoryId | ||
Description |
Gets the | ||
Return | osid.id.Id | the Id of this directory | |
Compliance | mandatory | This method must be implemented. | |
Method | getDirectory | ||
Description |
Gets the directory associated with this session. | ||
Return | osid.filing.Directory | the directory associated with this session | |
Errors | OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | canLookupDirectoryEntries | ||
Description |
Tests if this user can perform entry lookups. A return
of true does not guarantee successful authorization. A
return of false indicates that it is known all methods in
this session will result in a | ||
Return | boolean | false if lookup methods are not authorized, true
otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | hasParentDirectory | ||
Description |
Tests if the directory associated with this session has a parent directory. | ||
Return | boolean | true if a parent exists, false otherwise | |
Compliance | mandatory | This method is must be implemented. | |
Method | getParentDirectory | ||
Description |
Gets the parent of the directory associated with this session. | ||
Return | osid.filing.Directory | the parent of the directory associated with this session | |
Errors | ILLEGAL_STATE | hasParentDirectory() is false | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | useComparativeDirectoryView | ||
Description |
The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision. | ||
Compliance | mandatory | This method is must be implemented. | |
Method | usePlenaryDirectoryView | ||
Description |
A complete view of the file or directory returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability. | ||
Compliance | mandatory | This method is must be implemented. | |
Method | useFederatedDirectoryView | ||
Description |
Federates the view for methods in this session. A federated view will include entries in directories which are children of this directory. | ||
Compliance | mandatory | This method is must be implemented. | |
Method | useIsolatedDirectoryView | ||
Description |
Isolates the view for methods in this session. An isolated view restricts lookups to this directory only. | ||
Compliance | mandatory | This method is must be implemented. | |
Method | exists | ||
Description |
Tests if a file, directory or alias name exists. In a federated view, the existence test is performed on this directory and any children of this directory. In an isolated view, the existence test is restrcited to this directory only. | ||
Parameters | string | name | a file or directory name |
Return | boolean | true if the name exists, false otherwise | |
Errors | NULL_ARGUMENT | name is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method is must be implemented. | |
Method | isFile | ||
Description |
Tests if a name exists and is a file or an alias to a file. In a federated view, the exietence test is performed on this directory and any children of this directory. In an isolated view, the existence test is restrcited to this directory only. | ||
Parameters | string | name | a file name |
Return | boolean | true if the name is a file, false otherwise | |
Errors | NULL_ARGUMENT | name is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method is must be implemented. | |
Method | isDirectory | ||
Description |
Tests if a name exists and is a directory or an alias to a directory. In a federated view, the exietence test is performed on this directory and any children of this directory. In an isolated view, the existence test is restrcited to this directory only. | ||
Parameters | string | name | a file or directory name |
Return | boolean | true if the path is a directory, false
otherwise | |
Errors | NULL_ARGUMENT | name is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method is must be implemented. | |
Method | isAlias | ||
Description |
Tests if a name exists and is an alias. In a federated view, the exietence test is performed on this directory and any children of this directory. In an isolated view, the existence test is restrcited to this directory only. | ||
Parameters | string | name | a file or directory name |
Return | boolean | true if the path is an alias, false otherwise | |
Errors | NULL_ARGUMENT | name is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method is must be implemented. | |
Method | getFile | ||
Description |
Gets a specified file or alias to the file by its name
in the current directory only. For federated views, use
| ||
Parameters | string | name | the name to the file |
Return | osid.filing.File | the file | |
Errors | NOT_FOUND | name is not found or is a directory | |
NULL_ARGUMENT | name is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getFilesByName | ||
Description |
Gets a specified files and aliases to files for the
given file name. In an isolated view, this method behaves
like | ||
Parameters | string | name | the name of the file |
Return | osid.filing.FileList | the list of files of the given name | |
Errors | NULL_ARGUMENT | name is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getFiles | ||
Description |
Gets the list of files and aliases to files in this directory. In a federated view, this method returns all files in descendant directories. In plenary mode, the returned list contains all known files or an error results. Otherwise, the returned list may contain only those files that are accessible through this session. | ||
Return | osid.filing.FileList | the list of files in this directory | |
Errors | OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getSubdirectory | ||
Description |
Gets a specified directory or alias to the directory by
its name in the current directory only. For federated
views, use | ||
Parameters | string | name | the name of the directory |
Return | osid.filing.Directory | the directory | |
Errors | NOT_FOUND | name is not found or is a file | |
NULL_ARGUMENT | name is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getSubdirectoriesByName | ||
Description |
Gets a specified directories and aliases to directories
for the given directory name. In an isolated view, this
method behaves like | ||
Parameters | string | name | the name of the file |
Return | osid.filing.DirectoryList | the list of files of the given name | |
Errors | NULL_ARGUMENT | name is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getSubdirectories | ||
Description |
Gets the list of directories and aliases to directories in this directory. In a federated view, this method returns all directories in descedent directories. In plenary mode, the returned list contains all known files or an error results. Otherwise, the returned list may contain only those files that are accessible through this session. | ||
Return | osid.filing.DirectoryList | the list of directories in this directory | |
Errors | OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. |