com.caucho.env.vfs
Class RepositoryPath

java.lang.Object
  extended by com.caucho.vfs.Path
      extended by com.caucho.env.vfs.RepositoryPath
All Implemented Interfaces:
java.lang.Comparable<Path>

public class RepositoryPath
extends Path

Virtual path based on an expansion repository


Field Summary
 
Fields inherited from class com.caucho.vfs.Path
_pathSeparatorChar, _schemeMap, _separatorChar
 
Constructor Summary
protected RepositoryPath(RepositoryRoot repository, RepositoryPath root, Path physicalPath)
           
  RepositoryPath(java.lang.String tagId, Path physicalRoot)
           
 
Method Summary
 boolean canRead()
          Tests if the file can be read.
 boolean canWrite()
          Tests if the file can be written.
 boolean exists()
          Tests if the file exists.
 long getCrc64()
          Returns the crc64 code.
 long getCreateTime()
          Returns the create time of the file.
 long getLastAccessTime()
          Returns the last access time of the file.
 long getLastModified()
          Returns the last modified time of the file.
 long getLength()
          Returns the length of the file in bytes.
 java.lang.String getPath()
          Returns the path.
 java.lang.String getScheme()
          Returns the url scheme
 boolean isDirectory()
          Tests if the path refers to a directory.
 boolean isFile()
          Tests if the path refers to a file.
 java.lang.String[] list()
           
 StreamImpl openReadImpl()
           
 Path schemeWalk(java.lang.String userPath, java.util.Map<java.lang.String,java.lang.Object> newAttributes, java.lang.String newPath, int offset)
          Path-specific lookup.
 
Methods inherited from class com.caucho.vfs.Path
bind, cacheCopy, canExecute, changeGroup, changeGroup, changeOwner, changeOwner, chmod, clearStatusCache, compareTo, copy, createDepend, createLink, createNewFile, createRoot, createRoot, createTempFile, equals, escapeURL, getAttribute, getAttributeNames, getBlockCount, getBlockSize, getCache, getCertificates, getContentType, getDevice, getDeviceId, getDiskSpaceFree, getDiskSpaceTotal, getFileSeparatorChar, getFullPath, getGroup, getHost, getInode, getLastStatusChangeTime, getMode, getNativePath, getNewlineString, getNumberOfLinks, getObject, getOwner, getParent, getPathSeparatorChar, getPort, getQuery, getRelativePath, getResources, getResources, getSchemeMap, getSeparatorChar, getTail, getURL, getUser, getUserDir, getUserPath, getValue, hashCode, isBlockDevice, isCharacterDevice, isExecutable, isFIFO, isHardLink, isLink, isObject, isPathCacheable, isSocket, isSymbolicLink, isWindows, isWindowsInsecure, iterator, lookup, lookup, lookup, lookupImpl, lookupNative, lookupNative, lookupRelativeNativePath, mkdir, mkdirs, openAppend, openAppendImpl, openFileRandomAccess, openMemoryMappedFile, openRandomAccess, openRead, openReadWrite, openReadWrite, openReadWrite, openReadWriteImpl, openWrite, openWriteImpl, putCache, readLink, realPath, remove, removeAll, renameTo, renameTo, scanScheme, setDefaultSchemeMap, setExecutable, setLastModified, setObject, setTestWindows, setUserPath, setValue, toString, truncate, truncate, unbind, writeToStream, writeToStream
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RepositoryPath

public RepositoryPath(java.lang.String tagId,
                      Path physicalRoot)
               throws java.io.IOException
Throws:
java.io.IOException

RepositoryPath

protected RepositoryPath(RepositoryRoot repository,
                         RepositoryPath root,
                         Path physicalPath)
Method Detail

getPath

public java.lang.String getPath()
Description copied from class: Path
Returns the path. e.g. for HTTP, returns the part after the host and port.

Specified by:
getPath in class Path

getScheme

public java.lang.String getScheme()
Description copied from class: Path
Returns the url scheme

Specified by:
getScheme in class Path

schemeWalk

public Path schemeWalk(java.lang.String userPath,
                       java.util.Map<java.lang.String,java.lang.Object> newAttributes,
                       java.lang.String newPath,
                       int offset)
Description copied from class: Path
Path-specific lookup. Path implementations will override this.

Specified by:
schemeWalk in class Path
Parameters:
userPath - the user's lookup() path.
newAttributes - the attributes for the new path.
newPath - the lookup() path
offset - offset into newPath to start lookup.
Returns:
the found path

exists

public boolean exists()
Description copied from class: Path
Tests if the file exists.

Overrides:
exists in class Path

isFile

public boolean isFile()
Description copied from class: Path
Tests if the path refers to a file.

Overrides:
isFile in class Path

isDirectory

public boolean isDirectory()
Description copied from class: Path
Tests if the path refers to a directory.

Overrides:
isDirectory in class Path

canRead

public boolean canRead()
Description copied from class: Path
Tests if the file can be read.

Overrides:
canRead in class Path

canWrite

public boolean canWrite()
Description copied from class: Path
Tests if the file can be written.

Overrides:
canWrite in class Path

getLength

public long getLength()
Description copied from class: Path
Returns the length of the file in bytes.

Overrides:
getLength in class Path
Returns:
0 for non-files

getLastModified

public long getLastModified()
Description copied from class: Path
Returns the last modified time of the file. According to the jdk, this may not correspond to the system time.

Overrides:
getLastModified in class Path
Returns:
0 for non-files.

getCreateTime

public long getCreateTime()
Description copied from class: Path
Returns the create time of the file.

Overrides:
getCreateTime in class Path
Returns:
0 for non-files.

getLastAccessTime

public long getLastAccessTime()
Description copied from class: Path
Returns the last access time of the file.

Overrides:
getLastAccessTime in class Path
Returns:
0 for non-files.

getCrc64

public long getCrc64()
Description copied from class: Path
Returns the crc64 code.

Overrides:
getCrc64 in class Path

list

public java.lang.String[] list()
                        throws java.io.IOException
Overrides:
list in class Path
Returns:
The contents of this directory or null if the path does not refer to a directory.
Throws:
java.io.IOException

openReadImpl

public StreamImpl openReadImpl()
                        throws java.io.IOException
Overrides:
openReadImpl in class Path
Throws:
java.io.IOException