|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Vfs
A virtual file system.
Vfs serves three major purposes.
First, it embodies the concept of a hierarchical filesystem, rather than just
a file or directory. File, while sufficient for most
purposes, is primarily designed to represent a single file, and doing
multiple file operations with it (recursive deletes or copies, directory
searches, etc.) is very clumsy. A Vfs represents a filesystem as a whole.
Second, Vfs provides an abstraction from standard disk-based filesystems, allowing alternate storage implementations. VFSModules can be written which allow you to treat a website, FTP site, zipfile, database, or other data source as a hierarchical filesystem, without changing the code required by Vfs clients to examine and manipulate it.
Third, Vfs provides a wealth of convenience methods for examining and
manipulating a filesystem. These are written in the spirit of UNIX tools such
as cp, rm, and find. Recursively finding, copying, and deleting files are
essential to serious file management, and File has no
equivalents to these.
Copyright 2004-2007 Partner Software, Inc.
| Method Summary | |
|---|---|
VfsDirectory |
directoryFor(Path path)
Returns a VfsDirectory for the given path. |
VfsDirectory |
directoryFor(java.lang.String pathString)
Returns a VfsDirectory for the given path. |
VfsFile |
fileFor(Path path)
Returns a VfsFile for the given path. |
VfsFile |
fileFor(java.lang.String pathString)
Returns a VfsFile for the given path string. |
Path |
getAbsolutePath()
Absolute path to the root of this Vfs. |
boolean |
isWritable()
True if this module supports writing. |
| Method Detail |
|---|
Path getAbsolutePath()
boolean isWritable()
VfsFile fileFor(Path path)
path - to file
VfsDirectory directoryFor(Path path)
path - to directory
VfsFile fileFor(java.lang.String pathString)
pathString - string-encoded path to file
VfsDirectory directoryFor(java.lang.String pathString)
pathString - string-encoded path to directory
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||