Package com.iizigo.app
Class EclipseIPathFile
java.lang.Object
com.iizigo.app.EclipseIPathFile
- All Implemented Interfaces:
- IIFile,- IIResource
The Eclipse file reference.
- Author:
- Christopher Mindus
- Constructor SummaryConstructorsConstructorDescription- EclipseIPathFile- (IPath path, IFileStore fileStore) Constructs a file from a path.
- Method SummaryModifier and TypeMethodDescription- booleanCompares two resources.Get the Java canonical File.- longGets the file size.Gets the full path to the resource.- longGets the file modified time in milliseconds since the epoch.- getName()Gets the name of the resource.- int- hashCode()The hash code.- booleanChecks if this resource is a directory.- static IIResource- newResource- (IPath path) Creates an EclipseIPathFile or EclipseIPathDirectory depending on the IPath.- openInputStream- (Object monitor) Opens the input stream to the file.- toString()Resource String representation is the file name.- Methods inherited from class java.lang.Object- clone, finalize, getClass, notify, notifyAll, wait, wait, wait- Methods inherited from interface com.iizix.app.builder.IIResource- equals
- Constructor Details- EclipseIPathFileConstructs a file from a path.- Parameters:
- path- The path.
- Throws:
- FileNotFoundException- If file does not exist.
- IOException- If it's a directory.
 
 
- Method Details- newResourceCreates an EclipseIPathFile or EclipseIPathDirectory depending on the IPath.- Parameters:
- path- The path.
- Throws:
- IOException- For I/O errors.
 
- getFullPathGets the full path to the resource.- Specified by:
- getFullPathin interface- IIResource
 
- getFileGet the Java canonical File.- Specified by:
- getFilein interface- IIResource
- Parameters:
- monitor- The IProgressMonitor, null for none.
- Returns:
- a File in canonical form.
- Throws:
- IOException- For I/O errors.
 
- openInputStreamOpens the input stream to the file.- Specified by:
- openInputStreamin interface- IIFile
- Parameters:
- monitor- The IProgressMonitor, null for none.
- Returns:
- The input stream.
- Throws:
- IOException- For read errors.
 
- isDirectorypublic boolean isDirectory()Checks if this resource is a directory.- Specified by:
- isDirectoryin interface- IIResource
- Returns:
- false.
 
- getNameGets the name of the resource.- Specified by:
- getNamein interface- IIResource
- Returns:
- The name of the resource (also includes the file extension).
 
- equalsCompares two resources.
- hashCodepublic int hashCode()The hash code.
- toStringResource String representation is the file name.
- getFileSizepublic long getFileSize()Gets the file size.- Specified by:
- getFileSizein interface- IIFile
 
- getLastModifiedpublic long getLastModified()Gets the file modified time in milliseconds since the epoch.- Specified by:
- getLastModifiedin interface- IIFile
- Returns:
- Milliseconds since 1st January 1970, 0:00.