Interface | osid.filing.FileContentSession | ||
---|---|---|---|
Implements | osid.OsidSession | ||
Description |
This session defines methods forreading and writing files. The directory associated with this session is the current working directory and any relative path names provided are with respect to this directory. | ||
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 | canReadFiles | ||
Description |
Tests if this user can access files in this directory.
A return of true does not guarantee successful
authorization. A return of false indicates that it is
known accessing this file will result in a | ||
Return | boolean | false if file access is not authorized, true
otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | getInputStream | ||
Description |
Gets the input stream for reading a file. The input stream reads until the end of the file. | ||
Parameters | string | name | the relative or absolute path name |
Return | osid.transport.DataInputStream | the input stream for reading this file | |
Errors | NOT_FOUND | name is not found | |
NULL_ARGUMENT | name is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getBlockingInputStream | ||
Description |
Gets the input stream for reading this file. The returned input stream, once it reaches the end of the file, blocks for new content that may be later appended to the file. | ||
Parameters | string | name | the relative or absolute path name |
Return | osid.transport.DataInputStream | the input stream for reading this file | |
Errors | NOT_FOUND | name is not found | |
NULL_ARGUMENT | name is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | canWriteFiles | ||
Description |
Tests if this user can update this file. A return of
true does not guarantee successful authorization. A return
of false indicates that it is known writing to this this
file will result in a | ||
Return | boolean | false if file writing is not authorized, true
otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | getOutputStream | ||
Description |
Gets an output stream for writing to this file, replacing any existing contents. | ||
Parameters | string | name | the relative or absolute path name |
Return | osid.transport.DataOutputStream | the output stream for writing to this file | |
Errors | NOT_FOUND | name is not found | |
NULL_ARGUMENT | name is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getOutputStreamForAppend | ||
Description |
Gets an output stream for appending to this file. | ||
Parameters | string | name | the relative or absolute path name |
Return | osid.transport.DataOutputStream | the output stream for appending to this file | |
Errors | NOT_FOUND | name is not found | |
NULL_ARGUMENT | name is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | touch | ||
Description |
Updates the modified time of a file to be the current time. | ||
Parameters | string | name | the relative or absolute path name |
Errors | NOT_FOUND | name is not found | |
NULL_ARGUMENT | name is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. |