|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.io.File
gs.hitchin.hitchfs.FakeFile
public class FakeFile
A testing version of java.io.File. Each method is overridden to call back to a FakeFileOperations interface, allowing fine grained control of what files are allowed to do. The original java.io.File methods are still available to be called with the same method name with an underscore prepended. For example, a call of .exists() on FakeFile will call back to a provided FakeFileOperations implementation, where ._exists() will call the original File implementation.
| Field Summary |
|---|
| Fields inherited from class java.io.File |
|---|
pathSeparator, pathSeparatorChar, separator, separatorChar |
| Constructor Summary | |
|---|---|
FakeFile(FakeFileOperations fs,
File file)
http://www.docjar.com/html/api/java/io/File.java.html |
|
FakeFile(FakeFileOperations fs,
File parent,
String child)
http://www.docjar.com/html/api/java/io/File.java.html |
|
FakeFile(FakeFileOperations fs,
String pathname)
http://www.docjar.com/html/api/java/io/File.java.html |
|
FakeFile(FakeFileOperations fs,
String parent,
String child)
http://www.docjar.com/html/api/java/io/File.java.html |
|
FakeFile(FakeFileOperations fs,
URI uri)
http://www.docjar.com/html/api/java/io/File.java.html |
|
| Methods inherited from class java.io.File |
|---|
createTempFile, createTempFile, listRoots, toURL |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FakeFile(FakeFileOperations fs,
File file)
public FakeFile(FakeFileOperations fs,
File parent,
String child)
public FakeFile(FakeFileOperations fs,
String pathname)
public FakeFile(FakeFileOperations fs,
String parent,
String child)
public FakeFile(FakeFileOperations fs,
URI uri)
| Method Detail |
|---|
public boolean _canExecute()
public boolean _canRead()
public boolean _canWrite()
public int _compareTo(File pathname)
public boolean _createNewFile()
throws IOException
IOExceptionpublic boolean _delete()
public void _deleteOnExit()
public boolean _equals(Object obj)
public boolean _exists()
public File _getAbsoluteFile()
public String _getAbsolutePath()
public File _getCanonicalFile()
throws IOException
IOException
public String _getCanonicalPath()
throws IOException
IOExceptionpublic long _getFreeSpace()
public String _getName()
public String _getParent()
public File _getParentFile()
public String _getPath()
public long _getTotalSpace()
public long _getUsableSpace()
public int _hashCode()
public boolean _isAbsolute()
public boolean _isDirectory()
public boolean _isFile()
public boolean _isHidden()
public long _lastModified()
public long _length()
public String[] _list()
public String[] _list(FilenameFilter filter)
public File[] _listFiles()
public File[] _listFiles(FileFilter filter)
public File[] _listFiles(FilenameFilter filter)
public boolean _mkdir()
public boolean _mkdirs()
public boolean _renameTo(File dest)
public boolean _setExecutable(boolean executable)
public boolean _setExecutable(boolean executable,
boolean ownerOnly)
public boolean _setLastModified(long time)
public boolean _setReadable(boolean readable)
public boolean _setReadable(boolean readable,
boolean ownerOnly)
public boolean _setReadOnly()
public boolean _setWritable(boolean writable)
public boolean _setWritable(boolean writable,
boolean ownerOnly)
public String _toString()
public URI _toURI()
public boolean canExecute()
canExecute in class Filepublic boolean canRead()
canRead in class Filepublic boolean canWrite()
canWrite in class Filepublic int compareTo(File pathname)
compareTo in interface Comparable<File>compareTo in class File
public boolean createNewFile()
throws IOException
createNewFile in class FileIOExceptionpublic boolean delete()
delete in class Filepublic void deleteOnExit()
deleteOnExit in class Filepublic boolean equals(Object obj)
equals in class Filepublic boolean exists()
exists in class Filepublic File getAbsoluteFile()
getAbsoluteFile in class Filepublic String getAbsolutePath()
getAbsolutePath in class File
public File getCanonicalFile()
throws IOException
getCanonicalFile in class FileIOException
public String getCanonicalPath()
throws IOException
getCanonicalPath in class FileIOExceptionpublic long getFreeSpace()
getFreeSpace in class Filepublic String getKey()
public String getName()
getName in class Filepublic String getParent()
getParent in class Filepublic File getParentFile()
getParentFile in class Filepublic String getPath()
getPath in class Filepublic String getPathField()
public static String getPathField(File file)
public static int getPrefixLength(File file)
public int getPrefixLengthField()
public PropStore getProperties()
public <T extends FileProp> T getProperty(Class<T> prop)
public long getTotalSpace()
getTotalSpace in class Filepublic long getUsableSpace()
getUsableSpace in class Filepublic int hashCode()
hashCode in class Filepublic boolean hasProperty(Class<?> type)
public boolean isAbsolute()
isAbsolute in class Filepublic boolean isDirectory()
isDirectory in class Filepublic boolean isFile()
isFile in class Filepublic boolean isHidden()
isHidden in class Filepublic long lastModified()
lastModified in class Filepublic long length()
length in class Filepublic String[] list()
list in class Filepublic String[] list(FilenameFilter filter)
list in class Filepublic File[] listFiles()
listFiles in class Filepublic File[] listFiles(FileFilter filter)
listFiles in class Filepublic File[] listFiles(FilenameFilter filter)
listFiles in class Filepublic boolean mkdir()
mkdir in class Filepublic boolean mkdirs()
mkdirs in class Filepublic boolean renameTo(File dest)
renameTo in class Filepublic boolean setExecutable(boolean executable)
setExecutable in class File
public boolean setExecutable(boolean executable,
boolean ownerOnly)
setExecutable in class Filepublic void setHidden(boolean hidden)
public FakeFile setKey(String key)
public boolean setLastModified(long time)
setLastModified in class Filepublic FakeFile setPathField(String path)
public FakeFile setPrefixLengthField(int prefixLength)
public void setProperties(PropStore props)
public boolean setReadable(boolean readable)
setReadable in class File
public boolean setReadable(boolean readable,
boolean ownerOnly)
setReadable in class Filepublic boolean setReadOnly()
setReadOnly in class Filepublic boolean setWritable(boolean writable)
setWritable in class File
public boolean setWritable(boolean writable,
boolean ownerOnly)
setWritable in class Filepublic String toString()
toString in class Filepublic void touch()
public URI toURI()
toURI in class File
public <P extends FileProp,S> S visitProperty(Class<P> type,
PropStore.PropVisitor<P,S> visitor)
public <T extends FileProp> FakeFile withProperty(Class<T> type,
T value)
public FakeFile withProperty(FileProp property)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||