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, setLastModifiedbind, createRoot, getFullPath, getParent, getPath, getRoot, getTail, getUserPath, init, normalizePath, normalizePath, setUserPathcacheCopy, 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, writeToStreamprotected 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 FilePathpublic long getLastAccessTime()
getLastAccessTime in class Pathpublic long getLastModified()
getLastModified in class FilePathpublic long getLastStatusChangeTime()
getLastStatusChangeTime in class Pathpublic long getLength()
public boolean chmod(int mode)
public boolean changeOwner(java.lang.String owner)
changeOwner in class Pathpublic boolean canRead()
public boolean isDirectory()
isDirectory in class FilePathpublic boolean isFile()
public boolean isLink()
public boolean isSocket()
public boolean isBlockDevice()
isBlockDevice in class Pathpublic boolean isCharacterDevice()
isCharacterDevice in class Pathpublic boolean remove()
public boolean truncate(long length)
throws java.io.IOException
public StreamImpl openReadImpl() throws java.io.IOException
openReadImpl in class FilePathjava.io.IOExceptionpublic StreamImpl openWriteImpl() throws java.io.IOException
openWriteImpl in class FilePathjava.io.IOExceptionpublic StreamImpl openAppendImpl() throws java.io.IOException
openAppendImpl in class FilePathjava.io.IOExceptionpublic void sendfile(java.io.OutputStream os,
long offset,
long length)
throws java.io.IOException
Pathpublic RandomAccessStream openMemoryMappedFile(long fileLength) throws java.io.IOException
PathopenMemoryMappedFile in class FilePathjava.io.IOExceptionpublic RandomAccessStream openRandomAccess() throws java.io.IOException
openRandomAccess in class Pathjava.io.IOExceptionpublic 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 linkjava.io.IOExceptionpublic java.lang.String readLink()
public java.lang.String realPath()
public long getDevice()
public long getInode()
public int getMode()
public int getNumberOfLinks()
getNumberOfLinks in class Pathpublic int getUser()
public int getGroup()
public long getDeviceId()
getDeviceId in class Pathpublic long getBlockSize()
getBlockSize in class Pathpublic long getBlockCount()
getBlockCount in class Pathpublic void clearStatusCache()
PathclearStatusCache in class Path