|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.caucho.vfs.Path
com.caucho.vfs.FilesystemPath
com.caucho.vfs.FilePath
public class FilePath
FilePath implements the native filesystem.
Field Summary | |
---|---|
protected boolean |
_isWindows
|
Fields inherited from class com.caucho.vfs.FilesystemPath |
---|
_bindRoot, _pathname, _root, _userPath |
Fields inherited from class com.caucho.vfs.Path |
---|
_pathSeparatorChar, _schemeMap, _separatorChar, L |
Constructor Summary | |
---|---|
protected |
FilePath(FilesystemPath root,
java.lang.String userPath,
java.lang.String path)
|
|
FilePath(java.lang.String path)
|
Method Summary | |
---|---|
boolean |
canRead()
Tests if the file can be read. |
boolean |
canWrite()
Tests if the file can be written. |
Path |
copy()
|
boolean |
equals(java.lang.Object b)
|
boolean |
exists()
Tests if the file exists. |
Path |
fsWalk(java.lang.String userPath,
java.util.Map<java.lang.String,java.lang.Object> attributes,
java.lang.String path)
Lookup the actual path relative to the filesystem root. |
long |
getDiskSpaceFree()
|
long |
getDiskSpaceTotal()
|
java.io.File |
getFile()
Lazily returns the native File object. |
long |
getLastModified()
Returns the last modified time of the file. |
long |
getLength()
Returns the length of the file in bytes. |
int |
getMode()
Returns equivalent of struct stat.st_mode if appropriate. |
java.lang.String |
getNativePath()
Returns the native path. |
static java.lang.String |
getPwd()
Gets the system's user dir (pwd) and convert it to the Resin format. |
java.lang.String |
getScheme()
Returns the url scheme |
java.lang.String |
getURL()
Returns the full url for the given path. |
int |
hashCode()
|
protected static java.lang.String |
initialPath(java.lang.String path)
|
protected boolean |
isAux()
Special case for the evil windows special |
boolean |
isDirectory()
Tests if the path refers to a directory. |
boolean |
isFile()
Tests if the path refers to a file. |
protected boolean |
isPathCacheable()
Returns true if the path itself is cacheable |
java.lang.String[] |
list()
Returns a list of files in the directory. |
boolean |
mkdir()
Creates the directory named by this path. |
boolean |
mkdirs()
Creates the directory named by this path and any parent directories. |
StreamImpl |
openAppendImpl()
|
RandomAccessStream |
openFileRandomAccess()
Returns the stream implementation for a random-access stream. |
StreamImpl |
openReadImpl()
Returns the stream implementation for a read stream. |
StreamImpl |
openReadWriteImpl()
|
StreamImpl |
openWriteImpl()
|
boolean |
remove()
Removes the file or directory named by this path. |
boolean |
renameTo(Path path)
Renames the file or directory to the name given by the path. |
Path |
schemeWalk(java.lang.String userPath,
java.util.Map<java.lang.String,java.lang.Object> attributes,
java.lang.String filePath,
int offset)
Lookup the path, handling windows weirdness |
void |
setLastModified(long time)
|
boolean |
truncate(long length)
Sets the length of the file. |
Methods inherited from class com.caucho.vfs.FilesystemPath |
---|
bind, createRoot, getFullPath, getParent, getPath, getRoot, getTail, getUserPath, init, normalizePath, normalizePath, setUserPath |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected boolean _isWindows
Constructor Detail |
---|
protected FilePath(FilesystemPath root, java.lang.String userPath, java.lang.String path)
path
- canonical pathpublic FilePath(java.lang.String path)
Method Detail |
---|
protected static java.lang.String initialPath(java.lang.String path)
public static java.lang.String getPwd()
public long getDiskSpaceFree()
getDiskSpaceFree
in class Path
public long getDiskSpaceTotal()
getDiskSpaceTotal
in class Path
public Path schemeWalk(java.lang.String userPath, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String filePath, int offset)
schemeWalk
in class FilesystemPath
userPath
- the user's lookup() pathattributes
- the user's attributesfilePath
- the actual lookup() pathoffset
- offset into filePath
public Path fsWalk(java.lang.String userPath, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String path)
fsWalk
in class FilesystemPath
userPath
- the user's path to lookup()attributes
- the user's attributes to lookup()path
- the normalized path
protected boolean isPathCacheable()
isPathCacheable
in class Path
public java.lang.String getScheme()
Path
getScheme
in class Path
public java.lang.String getURL()
getURL
in class Path
public java.lang.String getNativePath()
getNativePath
in class Path
public boolean exists()
Path
exists
in class Path
public int getMode()
Path
getMode
in class Path
public boolean isDirectory()
Path
isDirectory
in class Path
public boolean isFile()
Path
isFile
in class Path
public long getLength()
Path
getLength
in class Path
public long getLastModified()
Path
getLastModified
in class Path
public void setLastModified(long time)
setLastModified
in class Path
public boolean canRead()
Path
canRead
in class Path
public boolean canWrite()
Path
canWrite
in class Path
public java.lang.String[] list() throws java.io.IOException
list
in class Path
java.io.IOException
public boolean mkdir() throws java.io.IOException
Path
mkdir
in class Path
java.io.IOException
public boolean mkdirs() throws java.io.IOException
Path
mkdirs
in class Path
java.io.IOException
public boolean remove()
Path
remove
in class Path
public boolean truncate(long length) throws java.io.IOException
Path
truncate
in class Path
java.io.IOException
public boolean renameTo(Path path)
Path
renameTo
in class Path
public StreamImpl openReadImpl() throws java.io.IOException
openReadImpl
in class Path
java.io.IOException
public StreamImpl openWriteImpl() throws java.io.IOException
openWriteImpl
in class Path
java.io.IOException
public StreamImpl openAppendImpl() throws java.io.IOException
openAppendImpl
in class Path
java.io.IOException
public StreamImpl openReadWriteImpl() throws java.io.IOException
openReadWriteImpl
in class Path
java.io.IOException
public RandomAccessStream openFileRandomAccess() throws java.io.IOException
openFileRandomAccess
in class Path
java.io.IOException
public Path copy()
copy
in class Path
public int hashCode()
hashCode
in class FilesystemPath
public boolean equals(java.lang.Object b)
equals
in class FilesystemPath
public java.io.File getFile()
protected boolean isAux()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |