|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectedu.mit.csail.aeolus.api.AeolusFile
public class AeolusFile
This class is used to create and manipulate AeolusFiles.
| Constructor Summary | |
|---|---|
AeolusFile(java.lang.String hostname,
java.lang.String path)
|
|
| Method Summary | |
|---|---|
boolean |
createNewFile(AeolusLabel sLabel,
AeolusLabel iLabel)
Creates a new file if the parent directory exists and there is no file with the given name. |
boolean |
delete()
Deletes the file. |
AeolusLabel |
getIntegrity()
Returns the integrity label of the file |
AeolusLabel |
getSecrecy()
Returns the secrecy label of the file |
java.lang.String[] |
list()
Lists the contents of the directory as an array of file names. |
boolean |
mkdir(AeolusLabel sLabel,
AeolusLabel iLabel)
Creates a new directory if the parent directory exists and there is no file with the given name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AeolusFile(java.lang.String hostname,
java.lang.String path)
| Method Detail |
|---|
public boolean createNewFile(AeolusLabel sLabel,
AeolusLabel iLabel)
throws java.io.FileNotFoundException,
InfoFlowControlException,
java.io.IOException,
AeolusException
sLabel - - file's secrecy labeliLabel - - file's integrity label
InfoFlowControlException - - if caller is not allowed to read and write the file's parent directory or
if it is not allowed to read a directory in the path. Also the file's labels cannot be less constraining
than the thread's labels. Please see the reference manual for rules concerning the root directory.
java.io.FileNotFoundException - - if the parent directory (or some part of the path) does not exist
java.io.IOException - - if an I/O error occurs while creating the file
AeolusException - - if there was an error communicating with hostname
public boolean delete()
throws java.io.FileNotFoundException,
InfoFlowControlException,
java.io.IOException,
AeolusException
java.io.FileNotFoundException - - if the file does not exist and the caller labels allow reading
its parent directory
java.io.IOException - - if an I/O error occurred while reading directory labels
InfoFlowControlException - - if caller labels don't allow reading and writing of the parent directory
or reading a higher parent directory in the case the file is missing
AeolusException - - if a failure occurs while communicating with hostname
public AeolusLabel getIntegrity()
throws java.io.FileNotFoundException,
InfoFlowControlException,
java.io.IOException,
AeolusException
java.io.FileNotFoundException - - if the file does not exist on hostname
java.io.IOException - - if an I/O error occurs while retrieving the label
InfoFlowControlException - - if caller labels don't allow reading the directories in the path
AeolusException - - if communication with hostname fails
public AeolusLabel getSecrecy()
throws java.io.FileNotFoundException,
InfoFlowControlException,
java.io.IOException,
AeolusException
java.io.FileNotFoundException - - if the file does not exist on hostname
java.io.IOException - - if an I/O error occurs while retrieving the label
InfoFlowControlException - - if caller labels don't allow reading the directories in the path
AeolusException - - if communication with hostname fails
public java.lang.String[] list()
throws java.io.FileNotFoundException,
InfoFlowControlException,
java.io.IOException,
AeolusException
java.io.FileNotFoundException - - if the directory does not exist and the caller labels allow reading its parent directory
java.io.IOException - - if an I/O error occurred while retrieving directory labels
InfoFlowControlException - - if caller labels don't allow reading the directory or
in the case the directory is missing, reading a higher parent directory of the given directory
AeolusException - - if a failure occurs while communicating with hostname
public boolean mkdir(AeolusLabel sLabel,
AeolusLabel iLabel)
throws java.io.FileNotFoundException,
InfoFlowControlException,
java.io.IOException,
AeolusException
sLabel - - directory's secrecy labeliLabel - - directory's integrity label
InfoFlowControlException - - if caller is not allowed to read and write directory's parent directory
or if it is not allowed to read a directory in the path. Also the directory's labels cannot be less
constraining than the tread labels. Please see the reference manual for rules concerning the root directory.
java.io.FileNotFoundException - - if parent directory (or some part of the path) does not exist
java.io.IOException - - if an I/O error occurs while creating the directory
AeolusException - - if there was an error communicating with hostname
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||