Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 70980 invoked from network); 28 Oct 2002 02:05:46 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 28 Oct 2002 02:05:46 -0000 Received: (qmail 7127 invoked by uid 97); 28 Oct 2002 02:06:40 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 7104 invoked by uid 97); 28 Oct 2002 02:06:40 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 7090 invoked by uid 97); 28 Oct 2002 02:06:39 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Date: 28 Oct 2002 02:05:30 -0000 Message-ID: <20021028020530.90493.qmail@icarus.apache.org> From: adammurdoch@apache.org To: jakarta-commons-sandbox-cvs@apache.org Subject: cvs commit: jakarta-commons-sandbox/vfs/xdocs anttasks.xml download.xml filesystems.xml getstarted.xml index.xml navigation.xml todo.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N adammurdoch 2002/10/27 18:05:30 Modified: vfs/xdocs index.xml navigation.xml todo.xml Added: vfs/xdocs anttasks.xml download.xml filesystems.xml getstarted.xml Log: Doc-o-rama. Revision Changes Path 1.2 +26 -22 jakarta-commons-sandbox/vfs/xdocs/index.xml Index: index.xml =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/vfs/xdocs/index.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- index.xml 16 Jul 2002 17:19:05 -0000 1.1 +++ index.xml 28 Oct 2002 02:05:30 -0000 1.2 @@ -1,27 +1,31 @@ - - - VFS : Virtual File System component - James Strachan - - - - -
- -

VFS implements a Virtual File System abstraction on top of a number of different -providers such as files, FTP, SMB, ZIP etc. -

- -

-VFS can be used inside a number of projects such as Ant, Anteater, Jelly, Latka, Maven etc. -

- -
- - - + + VFS : Virtual File System + James Strachan + + + +
+ +

+ The VFS component provides a common API for accessing + various different file systems. It presents a uniform view of + the files from various different sources, such as the files on + local disk, on an HTTP server, or inside a Zip archive. +

+ +

Some of the features of the VFS component are:

+
    +
  • A consistent API for accessing files of different types.
  • +
  • Support for numerous file system types.
  • +
  • Utilities like a VFS ClassLoader and URLStreamHandlerFactory.
  • +
  • A set of VFS Ant tasks.
  • +
  • More coming soon ...
  • +
+ +
+
1.3 +4 -0 jakarta-commons-sandbox/vfs/xdocs/navigation.xml Index: navigation.xml =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/vfs/xdocs/navigation.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- navigation.xml 18 Jul 2002 16:47:24 -0000 1.2 +++ navigation.xml 28 Oct 2002 02:05:30 -0000 1.3 @@ -7,6 +7,10 @@ + + + + 1.2 +53 -18 jakarta-commons-sandbox/vfs/xdocs/todo.xml Index: todo.xml =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/vfs/xdocs/todo.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- todo.xml 16 Jul 2002 17:19:07 -0000 1.1 +++ todo.xml 28 Oct 2002 02:05:30 -0000 1.2 @@ -1,24 +1,59 @@ - - TODO - James Strachan - + + TODO + James Strachan + - -
-

- The following is a list of items that need to be completed in - Jelly. Contributions are welcome!. -

- -
    -
  • fix compile errors!
  • -
  • use the FTP client from the 'net' component in the sandbox?
  • -
  • document!
  • -
-
- + +
+

+ The following is a list of items that need to be completed. + Contributions are welcome!. +

+ +
    +
  • More documentation
  • +
  • Add more providers: http, webdav, resources, tar, gzip, cvs, jndi, etc
  • +
  • Formalise the provider API.
  • +
  • The in-memory caching mechanism is pretty rudimentary at + this stage. It needs work to make it size capped. In addition, + some mechanism needs to be provided to release and refresh + cached info.
  • +
  • The on-disk caching mechanism also needs more work. Needs + to check last-modified time. Replicator needs to be more + configurable.
  • +
  • Add persistent replicator.
  • +
  • Add local mirroring.
  • +
  • Change AbstractLayeredFileSystem to track changes to + the parent file object. Eg when the parent file is deleted, + mark all the files in the fs as 'does-not-exist'.
  • +
  • Change AbstractLayeredFileSystem to support writeable + layered fs.
  • +
  • Make StandardFileSystemManager configurable from an XML descriptor.
  • +
  • Change the model so that folders may have content.
  • +
  • Add support for junctions (ie links).
  • +
  • Add support for federation (ie transparently crossing file + system boundaries, such as drilling down into the contents + of a Jar file).
  • +
  • Add Filtering file systems, which sit on top of another + file system, and alter the contents. For example, gzip or bzip2.
  • +
  • Add an equivalent of the fileScanner Jelly tag.
  • +
  • Add an equivalent of Ant fileset.
  • +
  • Allow selectors, name mappers, and filters to be specified + for the Ant tasks.
  • +
  • Capabilities discovery.
  • +
  • Attributes and attribute schema.
  • +
  • Handle file canonicalisation better (for cases like + case-insensitive file systems, symbolic links, name mangling, etc).
  • +
  • Add more selectors: XPath, Ant style, regular expression.
  • +
  • Add adaptor for use with JXpath.
  • +
  • Add contentChanged event to FileListener.
  • +
  • Provide a hook for authentication.
  • +
  • Sort out threading model.
  • +
+
+
1.1 jakarta-commons-sandbox/vfs/xdocs/anttasks.xml Index: anttasks.xml =================================================================== Ant Tasks Adam Murdoch

To use the Ant tasks, copy commons-jar.jar and its dependencies into the $ANT_HOME/lib directory, and use the following in your Ant scipt to define the tasks:

]]>

Alternatively, you can provide an explicit classpath when you define the tasks:

... ]]>

Copies a set of files to a destination folder.

Moves a set of files to a destination folder.

Synchronises a destination folder with a set of source files.

Deletes a file or folder.

Creates a folder.

1.1 jakarta-commons-sandbox/vfs/xdocs/download.xml Index: download.xml =================================================================== Download Adam Murdoch

Coming soon.

1.1 jakarta-commons-sandbox/vfs/xdocs/filesystems.xml Index: filesystems.xml =================================================================== Supported File Systems Adam Murdoch

Listed below are the supported file systems:

Provides access to the files on the local physical file system.

URI Format

[file://]absolute-path

Where absolute-path is a valid absolute file name for the local platform. UNC names are supported under Windows.

Examples

  • file://home/someuser/somedir
  • c:\program files\some dir
  • c:/program files/some dir
  • file:////somehost/someshare/afile.txt

Provides read-only access to the contents of Zip and Jar files.

URI Format

zip://zip-file-uri[!absolute-path]

jar://zip-file-uri[!absolute-path]

Where zip-file-uri refers to a file of any supported type, including other zip files. Note that any ! characters in zip-file-uri must be escaped using %21.

Examples

  • jar:../lib/classes.jar!/META-INF/manifest.mf
  • zip:http://somehost/downloads/somefile.zip
  • jar:zip:outer.zip%21/nested.jar!/somedir

Provides access to files on an HTTP server.

URI Format

http://hostname[:port][absolute-path]

https://hostname[:port][absolute-path]

Examples

  • http://somehost:8080/downloads/somefile.jar

Provides access to the files on an FTP server.

URI Format

ftp://[[password:]username@]hostname[:port][absolute-path]

Examples

  • ftp://mypassword:myusername@somehost/pub/downloads/somefile.tgz

Provides access to the files on a CIFS server, such as a Samba server, or a Windows share.

URI Format

smb://[[password:]username@]hostname[:port][absolute-path]

Examples

  • smb://somehost/home

Provides access to a temporary file system, or scratchpad, that gets deleted when the VFS is closed. The temporary file system is, by default, backed by local files.

URI Format

tmp://[absolute-path]

Examples

  • tmp://dir/somefile.txt
1.1 jakarta-commons-sandbox/vfs/xdocs/getstarted.xml Index: getstarted.xml =================================================================== Getting Started Adam Murdoch

The FileSystemManager interface provides access to the VFS. Using this interface you can locate files and create file systems. There are a number of ways to obtain a FileSystemManager instance. The simplest way is to use the static VFS.getManager() method. Alternatively, you can create an instance of DefaultFileSystemManager and configure it manually.

Once you have a FileSystemManager, you can use one of its resolveFile() methods to locate a file by name. For example:

Each file is represented by a FileObject instance. Using this interface you can create or delete the file, list its children, read or write its content, and so on. For example:

-- To unsubscribe, e-mail: For additional commands, e-mail: