org.xerial.util
Class FileResource.SystemFile

java.lang.Object
  extended by org.xerial.util.FileResource.SystemFile
All Implemented Interfaces:
VirtualFile
Enclosing class:
FileResource

public static class FileResource.SystemFile
extends Object
implements VirtualFile

A virtual file implementation for usual files

Author:
leo

Constructor Summary
FileResource.SystemFile(File file, String logicalPath)
           
 
Method Summary
 String getLogicalPath()
          Gets the logical path of the file.
 URL getURL()
          Gets the URL of this file
 boolean isDirectory()
          is directory?
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileResource.SystemFile

public FileResource.SystemFile(File file,
                               String logicalPath)
Method Detail

getLogicalPath

public String getLogicalPath()
Description copied from interface: VirtualFile
Gets the logical path of the file. For example, if this VirtualFile' URL is "file:/somewhere/org/xerial/util/FileResource.java", its logical name is org/xerial/util/FileResource.java, beginning from the root package.

Specified by:
getLogicalPath in interface VirtualFile
Returns:

getURL

public URL getURL()
Description copied from interface: VirtualFile
Gets the URL of this file

Specified by:
getURL in interface VirtualFile
Returns:

isDirectory

public boolean isDirectory()
Description copied from interface: VirtualFile
is directory?

Specified by:
isDirectory in interface VirtualFile
Returns:
true when the file is a directory, otherwise false

toString

public String toString()
Specified by:
toString in interface VirtualFile
Overrides:
toString in class Object


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.