com.partnersoft.io
Interface VFSModule

All Known Implementing Classes:
FileVFSModule, URLVFSModule, YonderVFSModule

public interface VFSModule

Plugin module providing filesystem functionality to VFS.

Author:
Paul Reavis Copyright 2004 Partner Software, Inc.

Method Summary
 boolean exists(java.lang.String path)
          True if the file exists.
 java.io.InputStream inputStreamFor(java.lang.String path)
          Returns an input stream for the given path.
 boolean isDirectory(java.lang.String path)
          True if the path is a directory.
 boolean isWritable()
          True if this module supports writing.
 long lastModified(java.lang.String path)
          Returns the timestamp for when the file was last modified.
 VFSNode[] list(java.lang.String path)
          Lists the entries in the virtual directory at path.
 java.io.OutputStream outputStreamFor(java.lang.String path)
          Returns on output stream for the given path.
 VFSRandomAccess randomAccessFor(java.lang.String path)
          Returns a random-access handle for the given path.
 void remove(java.lang.String path)
          Removes the file at the given path.
 int sizeOf(java.lang.String path)
          Returns the file size for the given path.
 

Method Detail

isWritable

boolean isWritable()
True if this module supports writing.


inputStreamFor

java.io.InputStream inputStreamFor(java.lang.String path)
                                   throws java.io.IOException
Returns an input stream for the given path.

Throws:
java.io.IOException

outputStreamFor

java.io.OutputStream outputStreamFor(java.lang.String path)
                                     throws java.io.IOException
Returns on output stream for the given path. Throws UnsupportedOperationException if isWritable() is false.

Throws:
java.io.IOException

randomAccessFor

VFSRandomAccess randomAccessFor(java.lang.String path)
                                throws java.io.IOException
Returns a random-access handle for the given path.

Throws:
java.io.IOException

exists

boolean exists(java.lang.String path)
               throws java.io.IOException
True if the file exists.

Throws:
java.io.IOException

isDirectory

boolean isDirectory(java.lang.String path)
                    throws java.io.IOException
True if the path is a directory.

Throws:
java.io.IOException

sizeOf

int sizeOf(java.lang.String path)
           throws java.io.IOException
Returns the file size for the given path.

Throws:
java.io.IOException

remove

void remove(java.lang.String path)
            throws java.io.IOException
Removes the file at the given path.

Throws:
java.io.IOException

list

VFSNode[] list(java.lang.String path)
               throws java.io.IOException
Lists the entries in the virtual directory at path.

Throws:
java.io.IOException

lastModified

long lastModified(java.lang.String path)
                  throws java.io.IOException
Returns the timestamp for when the file was last modified.

Throws:
java.io.IOException