vfs
Class VFSFile

java.lang.Object
  extended by vfs.VFSFile
All Implemented Interfaces:
VFSItem

public class VFSFile
extends java.lang.Object
implements VFSItem

A VFSFile is a leaf item in a virtual file system.

This is a Leaf class in the Composite design pattern whose other classes are VFSItem (Component) and VFSDirectory (Composite).


Constructor Summary
VFSFile(java.lang.String nm, VFSDirectory par)
          new VFSFile(nm, par) returns a virtual file for a file named nm whose parent directory is par.
 
Method Summary
 java.lang.String getName()
          f.getName() returns the name of itm.
 java.lang.String getSuffix()
          f.getsuffix() returns the filename suffix for f.
 java.net.URL getURL()
          f.getURL() returns the URL for f.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VFSFile

public VFSFile(java.lang.String nm,
               VFSDirectory par)
new VFSFile(nm, par) returns a virtual file for a file named nm whose parent directory is par.

Method Detail

getName

public java.lang.String getName()
f.getName() returns the name of itm.

Specified by:
getName in interface VFSItem
Returns:
the name of the file

getURL

public java.net.URL getURL()
f.getURL() returns the URL for f.

Specified by:
getURL in interface VFSItem
Returns:
the URL for the file

getSuffix

public java.lang.String getSuffix()
f.getsuffix() returns the filename suffix for f.

Returns:
the filename suffix for the file