public abstract class GooglePath extends FilesystemPath
Path.FileChannelFactory
Modifier and Type | Field and Description |
---|---|
protected FileService |
_fileService |
protected GoogleInode |
_inode |
protected GoogleInodeService |
_inodeService |
protected GooglePath |
_parent |
protected static java.lang.String |
QUERCUS_ROOT_PATH |
_bindRoot, _pathname, _root, _userPath
_pathSeparatorChar, _schemeMap, _separatorChar, L
Modifier | Constructor and Description |
---|---|
protected |
GooglePath(FileService fileService,
GoogleInodeService inodeService) |
protected |
GooglePath(FilesystemPath root,
java.lang.String userPath,
java.lang.String path,
FileService fileService,
GoogleInodeService inodeService) |
protected |
GooglePath(GooglePath path) |
Modifier and Type | Method and Description |
---|---|
boolean |
canRead()
Tests if the file can be read.
|
boolean |
canWrite()
Tests if the file can be written.
|
void |
clearStatusCache()
Clears any status cache
|
Path |
copy() |
protected abstract GooglePath |
createInstance(FilesystemPath root,
java.lang.String userPath,
java.lang.String path) |
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.
|
java.lang.String |
getFullPath()
For chrooted filesystems return the real system path.
|
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.
|
GooglePath |
getParent()
Return the parent Path
|
java.lang.String |
getScheme()
Returns the url scheme
|
java.lang.String |
getURL()
Returns the full url for the given path.
|
int |
hashCode() |
void |
init()
Call to initialize the root directory structure
|
boolean |
isDirectory()
Tests if the path refers to a directory.
|
boolean |
isExecutable()
Tests if the path is marked as executable
|
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.
|
RandomAccessStream |
openFileRandomAccess()
Opens a random-access stream.
|
StreamImpl |
openReadImpl()
Returns the stream implementation for a read stream.
|
boolean |
remove()
Removes the file or directory named by this path.
|
protected abstract boolean |
removeImpl() |
boolean |
renameTo(Path path)
Renames the file or directory to the name given by the path.
|
void |
setLastModified(long time) |
java.lang.String |
toString() |
bind, createRoot, getPath, getRoot, getTail, getUserPath, init, normalizePath, normalizePath, schemeWalk, setUserPath
cacheCopy, canExecute, changeGroup, changeGroup, changeOwner, changeOwner, chmod, compareTo, createDepend, createLink, createNewFile, createRoot, createTempFile, escapeURL, fileChannelFactory, getAttribute, getAttributeNames, getBlockCount, getBlockSize, getCache, getCertificates, getContentType, getCrc64, getCreateTime, getDevice, getDeviceId, getDiskSpaceFree, getDiskSpaceTotal, getFileSeparatorChar, getGroup, getHost, getInode, getLastAccessTime, getLastStatusChangeTime, getNativePath, getNewlineString, getNumberOfLinks, getObject, getOwner, getPathSeparatorChar, getPort, getQuery, getRelativePath, getResources, getResources, getSchemeMap, getSeparatorChar, getUser, getUserDir, getValue, isBlockDevice, isCharacterDevice, isFIFO, isHardLink, isLink, isObject, isSocket, isSymbolicLink, isWindows, isWindowsInsecure, iterator, lookup, lookup, lookup, lookupChild, lookupImpl, lookupNative, lookupNative, lookupRelativeNativePath, openAppend, openAppendImpl, openMemoryMappedFile, openRandomAccess, openRead, openReadWrite, openReadWrite, openReadWrite, openReadWriteImpl, openWrite, openWriteImpl, putCache, readLink, realPath, removeAll, renameTo, scanScheme, sendfile, setDefaultSchemeMap, setExecutable, setObject, setTestWindows, setValue, truncate, truncate, unbind, unwrap, writeToStream, writeToStream
protected static final java.lang.String QUERCUS_ROOT_PATH
protected FileService _fileService
protected GoogleInodeService _inodeService
protected GooglePath _parent
protected GoogleInode _inode
protected GooglePath(FilesystemPath root, java.lang.String userPath, java.lang.String path, FileService fileService, GoogleInodeService inodeService)
path
- canonical pathprotected GooglePath(FileService fileService, GoogleInodeService inodeService)
protected GooglePath(GooglePath path)
public void init()
public java.lang.String getFullPath()
FilesystemPath
getFullPath
in class FilesystemPath
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 pathprotected abstract GooglePath createInstance(FilesystemPath root, java.lang.String userPath, java.lang.String path)
public GooglePath getParent()
FilesystemPath
getParent
in class FilesystemPath
protected boolean isPathCacheable()
isPathCacheable
in class Path
public java.lang.String getScheme()
Path
public java.lang.String getURL()
public boolean exists()
Path
public int getMode()
Path
public boolean isExecutable()
Path
isExecutable
in class Path
public boolean isDirectory()
Path
isDirectory
in class Path
public boolean isFile()
Path
public long getLength()
Path
public long getLastModified()
Path
getLastModified
in class Path
public void setLastModified(long time)
setLastModified
in class Path
public boolean canRead()
Path
public boolean canWrite()
Path
public java.lang.String[] list() throws java.io.IOException
public boolean mkdir() throws java.io.IOException
Path
public boolean mkdirs() throws java.io.IOException
Path
public boolean remove()
Path
protected abstract boolean removeImpl()
public boolean renameTo(Path path) throws java.io.IOException
Path
public StreamImpl openReadImpl() throws java.io.IOException
openReadImpl
in class Path
java.io.IOException
public RandomAccessStream openFileRandomAccess() throws java.io.IOException
Path
openFileRandomAccess
in class Path
java.io.IOException
public void clearStatusCache()
Path
clearStatusCache
in class Path
public int hashCode()
hashCode
in class FilesystemPath
public boolean equals(java.lang.Object b)
equals
in class FilesystemPath