Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members
io::File Class ReferenceAn abstract representation of a physical file.
More...
Inheritance diagram for io::File:
[legend]Collaboration diagram for io::File:
[legend]List of all members.
Detailed Description
An abstract representation of a physical file.
An instance of this class presents an abstract, system-independent view of a physical file. User interfaces and operating systems use system-dependent pathname strings to identify physical files. GAT, however, uses an operating system independent pathname string to identify a physical file. A physical file in GAT is identified by a URI.
An instance of this File class allows for various high-level operations to be preformed on a physical file. For example, one can, with a single API call, copy a physical file from one location to a second location, move a physical file from one location to a second location, delete a physical file, and preform various other operations on a physical file. The utility of this high-level view of a physical file is multi-fold. The client of an instance of this class does not have to concern themselves with the details of reading every single byte of a physical file when all they wish to do is copy the physical file to a new location. Similarly, a client does not have to deal with all the various error states that can occur when moving a physical file ( Have all the various bytes been read correctly? Have all the various bytes been saved correctly? Did the deletion of the original file proceed correctly? ); the client simply has to call a single API call and the physical file is moved.
Definition at line 38 of file File.java.
Constructor & Destructor Documentation
|
|
Constructs a File instance which corresponds to the physical file identified by the passed URI and whose access rights are determined by the passed GATContext.
- Parameters:
-
| location |
A URI which represents the URI corresponding to the physical file. |
| gatContext |
A GATContext which is used to determine the access rights for this File. |
| preferences |
A Preferences which is used to determine the user's preferences for this File. |
- Exceptions:
-
| java |
.lang.Exception Thrown upon creation problems |
Definition at line 61 of file File.java.
References io::File::gatContext, io::File::location, and io::File::preferences. |
Member Function Documentation
| File io::File::create |
( |
GATContext |
gatContext, |
|
|
URI |
location |
|
) |
[inline, static] |
|
|
|
Constructs a File instance which corresponds to the physical file identified by the passed URI and whose access rights are determined by the passed GATContext.
- Parameters:
-
| location |
A URI which represents the URI corresponding to the physical file. |
| gatContext |
A GATContext which is used to determine the access rights for this File. |
- Exceptions:
-
| java |
.lang.Exception Thrown upon creation problems |
Definition at line 83 of file File.java.
References io::File::gatContext, and io::File::location. |
|
|
Constructs a File instance which corresponds to the physical file identified by the passed URI and whose access rights are determined by the passed GATContext.
- Parameters:
-
| location |
A URI which represents the URI corresponding to the physical file. |
| gatContext |
A GATContext which is used to determine the access rights for this File. |
| preferences |
A Preferences which is used to determine the user's preferences for this File. |
- Exceptions:
-
| java |
.lang.Exception Thrown upon creation problems |
Definition at line 104 of file File.java.
References io::File::gatContext, io::File::location, and io::File::preferences. |
| boolean io::File::equals |
( |
Object |
object |
) |
[inline] |
|
|
|
Tests this File for equality with the passed Object.
If the given object is not a File, then this method immediately returns false.
If the given object is a File, then it is deemed equal to this instance if a URI object constructed from this File's location and a URI object constructed from the passed File's URI are equal as determined by the Equals method of URI. - Parameters:
-
| object |
The Object to test for equality |
- Returns:
-
A boolean indicating equality
Definition at line 139 of file File.java.
References io::File::location.
Referenced by io::RandomAccessFile::equals(). |
| URI io::File::getURI |
( |
|
) |
[inline] |
|
| abstract void io::File::copy |
( |
URI |
loc |
) |
throws IOException, RemoteException [pure virtual] |
|
|
|
This method copies the physical file represented by this File instance to a physical file identified by the passed URI.
- Parameters:
-
- Exceptions:
-
| java |
.rmi.RemoteException Thrown upon problems accessing the remote instance |
| java |
.io.IOException Upon non-remote IO problem |
Referenced by io::File::move(). |
| void io::File::move |
( |
URI |
location |
) |
throws IOException [inline] |
|
|
|
This method moves the physical file represented by this File instance to a physical file identified by the passed URI.
- Parameters:
-
| location |
The URI to which to move the physical file corresponding to this File instance |
- Exceptions:
-
| java |
.rmi.RemoteException Thrown upon problems accessing the remote instance |
| java |
.io.IOException Upon non-remote IO problem |
Definition at line 180 of file File.java.
References io::File::copy(), and io::File::location. |
Member Data Documentation
URI io::File::location [protected]
|
|
The documentation for this class was generated from the following file:
|