Path.FileChannelFactory
_isWindows
_bindRoot, _pathname, _root, _userPath
_pathSeparatorChar, _schemeMap, _separatorChar, L
Modifier | Constructor and Description |
---|---|
|
JniFilePathImpl() |
protected |
JniFilePathImpl(FilesystemPath root,
java.lang.String userPath,
java.lang.String path) |
Modifier and Type | Method and Description |
---|---|
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
|
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.
|
void |
sendfile(java.io.OutputStream os,
long offset,
long length)
Utility to write the contents of this path to the destination stream.
|
boolean |
truncate(long length)
Truncate the file.
|
canWrite, equals, fileChannelFactory, getDiskSpaceFree, getDiskSpaceTotal, getFile, getNativePath, getPwd, getScheme, getURL, hashCode, initialPath, isAux, list, mkdir, mkdirs, openFileRandomAccess, openReadWriteImpl, renameTo, schemeWalk, setLastModified
bind, createRoot, getFullPath, getParent, getPath, getRoot, getTail, getUserPath, init, normalizePath, normalizePath, setUserPath
cacheCopy, canExecute, changeGroup, changeGroup, changeOwner, compareTo, createDepend, createNewFile, createRoot, createTempFile, escapeURL, getAttribute, getAttributeNames, getCache, getCertificates, getContentType, getCreateTime, getFileSeparatorChar, getHost, getNewlineString, getObject, getOwner, getPathSeparatorChar, getPort, getQuery, getRelativePath, getResources, getResources, getSchemeMap, getSeparatorChar, getUserDir, getValue, isExecutable, isHardLink, isObject, isSymbolicLink, isWindows, isWindowsInsecure, iterator, lookup, lookup, lookup, lookupChild, lookupImpl, lookupNative, lookupNative, lookupRelativeNativePath, openAppend, openRead, openReadWrite, openReadWrite, openReadWrite, openWrite, putCache, removeAll, renameTo, scanScheme, setDefaultSchemeMap, setExecutable, setObject, setTestWindows, setValue, toString, truncate, unbind, unwrap, writeToStream, writeToStream
protected JniFilePathImpl(FilesystemPath root, java.lang.String userPath, java.lang.String path)
path
- canonical pathpublic JniFilePathImpl()
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)
protected boolean isPathCacheable()
isPathCacheable
in class FilePath
public long getLastAccessTime()
getLastAccessTime
in class Path
public long getLastModified()
getLastModified
in class FilePath
public long getLastStatusChangeTime()
getLastStatusChangeTime
in class Path
public long getLength()
public boolean chmod(int mode)
public boolean changeOwner(java.lang.String owner)
changeOwner
in class Path
public boolean canRead()
public boolean isDirectory()
isDirectory
in class FilePath
public boolean isFile()
public boolean isLink()
public boolean isSocket()
public boolean isBlockDevice()
isBlockDevice
in class Path
public boolean isCharacterDevice()
isCharacterDevice
in class Path
public boolean remove()
public boolean truncate(long length) throws java.io.IOException
public StreamImpl openReadImpl() throws java.io.IOException
openReadImpl
in class FilePath
java.io.IOException
public StreamImpl openWriteImpl() throws java.io.IOException
openWriteImpl
in class FilePath
java.io.IOException
public StreamImpl openAppendImpl() throws java.io.IOException
openAppendImpl
in class FilePath
java.io.IOException
public void sendfile(java.io.OutputStream os, long offset, long length) throws java.io.IOException
Path
public RandomAccessStream openMemoryMappedFile(long fileLength) throws java.io.IOException
Path
openMemoryMappedFile
in class FilePath
java.io.IOException
public RandomAccessStream openRandomAccess() throws java.io.IOException
openRandomAccess
in class Path
java.io.IOException
public boolean createLink(Path target, boolean hardLink) throws java.io.IOException
createLink
in class Path
target
- the target of the linkhardLink
- true if the link should be a hard linkjava.io.IOException
public java.lang.String readLink()
public java.lang.String realPath()
public long getDevice()
public long getInode()
public int getMode()
public int getNumberOfLinks()
getNumberOfLinks
in class Path
public int getUser()
public int getGroup()
public long getDeviceId()
getDeviceId
in class Path
public long getBlockSize()
getBlockSize
in class Path
public long getBlockCount()
getBlockCount
in class Path
public void clearStatusCache()
Path
clearStatusCache
in class Path