|
||||||||||
| 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
com.caucho.vfs.JniFilePathImpl
public class JniFilePathImpl
FilePath implements the native filesystem.
| Field Summary |
|---|
| Fields inherited from class com.caucho.vfs.FilePath |
|---|
_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 | |
|---|---|
|
JniFilePathImpl()
|
protected |
JniFilePathImpl(FilesystemPath root,
java.lang.String userPath,
java.lang.String path)
|
| Method Summary | |
|---|---|
boolean |
canRead()
Returns true if the file can be read. |
boolean |
changeOwner(java.lang.String owner)
Sets the file mode. |
boolean |
chmod(int mode)
Sets the file mode. |
void |
clearStatusCache()
Clears any status cache |
protected Path |
copy()
|
boolean |
createLink(Path target,
boolean hardLink)
Creates a link named by this path to another path. |
boolean |
exists()
Returns true 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 |
getBlockCount()
Returns equivalent of struct stat.st_blocks if appropriate. |
long |
getBlockSize()
Returns equivalent of struct stat.st_blksize if appropriate. |
long |
getCrc64()
Returns the crc64 code. |
long |
getDevice()
Returns equivalent of struct stat.st_dev if appropriate. |
long |
getDeviceId()
Returns equivalent of struct stat.st_rdev if appropriate. |
int |
getGroup()
Returns equivalent of struct stat.st_gid if appropriate. |
static java.lang.String |
getInitMessage()
|
long |
getInode()
Returns equivalent of struct stat.st_ino if appropriate. |
long |
getLastAccessTime()
Returns the last access time of the file. |
long |
getLastModified()
Returns the last modified time. |
long |
getLastStatusChangeTime()
Returns equivalent of struct stat.st_ctime if appropriate. |
long |
getLength()
Returns the length modified time. |
int |
getMode()
Returns equivalent of struct stat.st_mode if appropriate. |
int |
getNumberOfLinks()
Returns equivalent of struct stat.st_nlink if appropriate. |
int |
getUser()
Returns equivalent of struct stat.st_uid if appropriate. |
boolean |
isBlockDevice()
Tests if the path refers to a block device. |
boolean |
isCharacterDevice()
Tests if the path refers to a block device. |
boolean |
isDirectory()
Returns true if the file is a directory. |
static boolean |
isEnabled()
Returns true if the JNI file path exists. |
boolean |
isFIFO()
Tests if the path refers to a FIFO. |
boolean |
isFile()
Returns true if the file is a regular file. |
boolean |
isLink()
Returns true if the file is a symbolic link. |
protected boolean |
isPathCacheable()
Returns true if the path itself is cacheable |
boolean |
isSocket()
Tests if the path refers to a socket. |
StreamImpl |
openAppendImpl()
Returns the stream implementation for an append stream. |
RandomAccessStream |
openMemoryMappedFile(long fileLength)
Opens a random-access stream. |
RandomAccessStream |
openRandomAccess()
Returns the stream implementation for a random-access stream. |
StreamImpl |
openReadImpl()
Returns the stream implementation for a read stream. |
StreamImpl |
openWriteImpl()
Returns the stream implementation for a write stream. |
java.lang.String |
readLink()
Returns the pathname of a link |
java.lang.String |
realPath()
Returns the pathname of a link |
boolean |
remove()
Remove the underlying file. |
boolean |
truncate(long length)
Truncate the file. |
| Methods inherited from class com.caucho.vfs.FilePath |
|---|
canWrite, equals, getDiskSpaceFree, getDiskSpaceTotal, getFile, getNativePath, getPwd, getScheme, getURL, hashCode, initialPath, isAux, list, mkdir, mkdirs, openFileRandomAccess, openReadWriteImpl, renameTo, schemeWalk, setLastModified |
| Methods inherited from class com.caucho.vfs.FilesystemPath |
|---|
bind, createRoot, getFullPath, getParent, getPath, getRoot, getTail, getUserPath, normalizePath, normalizePath, setUserPath |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected JniFilePathImpl(FilesystemPath root,
java.lang.String userPath,
java.lang.String path)
path - canonical pathpublic JniFilePathImpl()
| Method Detail |
|---|
public static boolean isEnabled()
public static java.lang.String getInitMessage()
public Path fsWalk(java.lang.String userPath,
java.util.Map<java.lang.String,java.lang.Object> attributes,
java.lang.String path)
fsWalk in class FilePathuserPath - the user's path to lookup()attributes - the user's attributes to lookup()path - the normalized path
protected boolean isPathCacheable()
isPathCacheable in class FilePathpublic boolean exists()
exists in class FilePathpublic long getLastAccessTime()
getLastAccessTime in class Pathpublic long getLastModified()
getLastModified in class FilePathpublic long getLastStatusChangeTime()
getLastStatusChangeTime in class Pathpublic long getLength()
getLength in class FilePathpublic boolean chmod(int mode)
chmod in class Pathpublic boolean changeOwner(java.lang.String owner)
changeOwner in class Pathpublic boolean canRead()
canRead in class FilePathpublic boolean isDirectory()
isDirectory in class FilePathpublic boolean isFile()
isFile in class FilePathpublic boolean isLink()
isLink in class Pathpublic boolean isSocket()
isSocket in class Pathpublic boolean isFIFO()
isFIFO in class Pathpublic boolean isBlockDevice()
isBlockDevice in class Pathpublic boolean isCharacterDevice()
isCharacterDevice in class Pathpublic long getCrc64()
getCrc64 in class Pathpublic boolean remove()
remove in class FilePath
public boolean truncate(long length)
throws java.io.IOException
truncate in class FilePathjava.io.IOException
public StreamImpl openReadImpl()
throws java.io.IOException
openReadImpl in class FilePathjava.io.IOException
public StreamImpl openWriteImpl()
throws java.io.IOException
openWriteImpl in class FilePathjava.io.IOException
public StreamImpl openAppendImpl()
throws java.io.IOException
openAppendImpl in class FilePathjava.io.IOException
public RandomAccessStream openMemoryMappedFile(long fileLength)
throws java.io.IOException
Path
openMemoryMappedFile in class Pathjava.io.IOException
public RandomAccessStream openRandomAccess()
throws java.io.IOException
openRandomAccess in class Pathjava.io.IOException
public boolean createLink(Path target,
boolean hardLink)
throws java.io.IOException
createLink in class Pathtarget - the target of the linkhardLink - true if the link should be a hard link
java.io.IOExceptionpublic java.lang.String readLink()
readLink in class Pathpublic java.lang.String realPath()
realPath in class Pathpublic long getDevice()
getDevice in class Pathpublic long getInode()
getInode in class Pathpublic int getMode()
getMode in class FilePathpublic int getNumberOfLinks()
getNumberOfLinks in class Pathpublic int getUser()
getUser in class Pathpublic int getGroup()
getGroup in class Pathpublic long getDeviceId()
getDeviceId in class Pathpublic long getBlockSize()
getBlockSize in class Pathpublic long getBlockCount()
getBlockCount in class Pathpublic void clearStatusCache()
Path
clearStatusCache in class Pathprotected Path copy()
copy in class FilePath
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||