com.partnersoft.net.yonder
Class YonderVfs

java.lang.Object
  extended by com.partnersoft.net.yonder.YonderVfs
All Implemented Interfaces:
Vfs

public class YonderVfs
extends java.lang.Object
implements Vfs

Vfs implementation for a Yonder remote file server.

Copyright 2004-2008 Partner Software, Inc.

Version:
$Id: TcpSocketClient.java 1012 2007-11-24 18:30:02Z paul $
Author:
Paul Reavis

Constructor Summary
YonderVfs(java.lang.String serverName)
           
YonderVfs(java.lang.String serverName, Path root)
           
 
Method Summary
 void connect()
           
 VfsDirectory directoryFor(Path path)
          Returns a VfsDirectory for the given path.
 VfsDirectory directoryFor(java.lang.String subPathString)
          Returns a VfsDirectory for the given path.
 void disconnect()
           
 VfsFile fileFor(Path path)
          Returns a VfsFile for the given path.
 VfsFile fileFor(java.lang.String subPathString)
          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.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

YonderVfs

public YonderVfs(java.lang.String serverName)
          throws java.io.IOException
Throws:
java.io.IOException

YonderVfs

public YonderVfs(java.lang.String serverName,
                 Path root)
          throws java.io.IOException
Throws:
java.io.IOException
Method Detail

connect

public void connect()
             throws java.io.IOException
Throws:
java.io.IOException

disconnect

public void disconnect()
                throws java.io.IOException
Throws:
java.io.IOException

getAbsolutePath

public Path getAbsolutePath()
Description copied from interface: Vfs
Absolute path to the root of this Vfs. Meaning depends on type of Vfs.

Specified by:
getAbsolutePath in interface Vfs

isWritable

public boolean isWritable()
Description copied from interface: Vfs
True if this module supports writing.

Specified by:
isWritable in interface Vfs
Returns:
true if module is writable

fileFor

public VfsFile fileFor(Path path)
Description copied from interface: Vfs
Returns a VfsFile for the given path. Note that this does not imply that the underlying file actually exists. You may use the methods provided by the VfsFile to read and write the file's contents.

Specified by:
fileFor in interface Vfs
Parameters:
path - to file
Returns:
file for given path

directoryFor

public VfsDirectory directoryFor(Path path)
Description copied from interface: Vfs
Returns a VfsDirectory for the given path. Note that this does not imply that the underlying file actually exists. You may use the methods provided by the VfsDirectory to list and modify the directory's contents.

Specified by:
directoryFor in interface Vfs
Parameters:
path - to directory
Returns:
directory for given path

directoryFor

public VfsDirectory directoryFor(java.lang.String subPathString)
Description copied from interface: Vfs
Returns a VfsDirectory for the given path. This is the same as directoryFor(new Path(pathString).

Specified by:
directoryFor in interface Vfs
Parameters:
subPathString - string-encoded path to directory
Returns:
directory for given path

fileFor

public VfsFile fileFor(java.lang.String subPathString)
Description copied from interface: Vfs
Returns a VfsFile for the given path string. This is the same as fileFor(new Path(pathString).

Specified by:
fileFor in interface Vfs
Parameters:
subPathString - string-encoded path to file
Returns:
file for given path

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object