public class FileSystemFile extends File
Constructor and Description |
---|
FileSystemFile(FileSystemDirectory parent,
java.io.File javaFile) |
FileSystemFile(FileSystemDirectory parent,
java.lang.String filePath) |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Delete this file if it exists.
|
boolean |
exists()
See if the file exists.
|
long |
getLastModifiedTime()
Get the last modified / last write timestamp of this file.
|
java.lang.String |
getName()
Get the name of this file/directory--the last component of the path.
|
Directory |
getParent() |
java.lang.String |
getPathString()
Get the string representation of the full path for this file/directory.
|
long |
getSize()
Get the size of this file.
|
void |
moveTo(File destination) |
OutputStream |
openForCreate()
Open the file for writing.
|
InputStream |
openForRead() |
void |
renameTo(java.lang.String newName)
Rename this file, giving it a new name in the same directory.
|
void |
setLastModifiedTime(long time)
Set the last modified / last write timestamp of this file.
|
copyTo, openForCreateAtomic, openForCreateAtomic, openUtf8ForCreate, openUtf8ForCreateAtomic, openUtf8ForRead
getNameExtension, toString
public FileSystemFile(FileSystemDirectory parent, java.lang.String filePath)
public FileSystemFile(FileSystemDirectory parent, java.io.File javaFile)
public InputStream openForRead()
openForRead
in class File
public OutputStream openForCreate()
File
openForCreate
in class File
public java.lang.String getName()
Path
public java.lang.String getPathString()
Path
getPathString
in class Path
public boolean exists()
File
public void delete()
File
public void renameTo(java.lang.String newName)
File
public long getLastModifiedTime()
File
getLastModifiedTime
in class File
public void setLastModifiedTime(long time)
File
setLastModifiedTime
in class File
time
- time in millis (milliseconds since Jan 1, 1970 UTC)