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, setUserPathcacheCopy, 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, writeToStreamprotected 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()
FilesystemPathgetFullPath in class FilesystemPathpublic Path fsWalk(java.lang.String userPath, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String path)
fsWalk in class FilesystemPathuserPath - 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()
FilesystemPathgetParent in class FilesystemPathprotected boolean isPathCacheable()
isPathCacheable in class Pathpublic java.lang.String getScheme()
Pathpublic java.lang.String getURL()
public boolean exists()
Pathpublic int getMode()
Pathpublic boolean isExecutable()
PathisExecutable in class Pathpublic boolean isDirectory()
PathisDirectory in class Pathpublic boolean isFile()
Pathpublic long getLength()
Pathpublic long getLastModified()
PathgetLastModified in class Pathpublic void setLastModified(long time)
setLastModified in class Pathpublic boolean canRead()
Pathpublic boolean canWrite()
Pathpublic java.lang.String[] list()
throws java.io.IOException
public boolean mkdir()
throws java.io.IOException
Pathpublic boolean mkdirs()
throws java.io.IOException
Pathpublic boolean remove()
Pathprotected abstract boolean removeImpl()
public boolean renameTo(Path path) throws java.io.IOException
Pathpublic StreamImpl openReadImpl() throws java.io.IOException
openReadImpl in class Pathjava.io.IOExceptionpublic RandomAccessStream openFileRandomAccess() throws java.io.IOException
PathopenFileRandomAccess in class Pathjava.io.IOExceptionpublic void clearStatusCache()
PathclearStatusCache in class Pathpublic int hashCode()
hashCode in class FilesystemPathpublic boolean equals(java.lang.Object b)
equals in class FilesystemPath