org.millscript.commons.vfs.protocols.http
Class HttpFolder

java.lang.Object
  extended by org.millscript.commons.vfs.AbstractVEntry<V>
      extended by org.millscript.commons.vfs.AbstractVFolder<HttpVolume>
          extended by org.millscript.commons.vfs.protocols.http.HttpFolder
All Implemented Interfaces:
org.millscript.commons.alert.AlertDecorator, VEntry, VFolder

public class HttpFolder
extends AbstractVFolder<HttpVolume>

This class implements a virtual filesystem folder for an HTTP filesystem folder.


Method Summary
 VEntry checkVEntry(java.lang.String segment)
          Returns the entry for the child with the specified name, but only if it exists and throws an exception otherwise.
 HttpFile checkVFile(java.lang.String segment)
          Returns the entry for the child file with the specified name, but only if it exists and throws an exception otherwise.
 HttpFolder checkVFolder(java.lang.String segment)
          Returns the entry for the child folder with the specified name, but only if it exists and throws an exception otherwise.
 boolean exists()
          Tests to see if the entry exits.
 HttpFile getVFile(java.lang.String segment)
          Returns the entry for the child file with the specified name.
 HttpFolder getVFolder(java.lang.String segment)
          Returns the entry for the child folder with the specified name.
 java.util.List<VEntry> listEntries()
          Returns a list of all the child entries in this folder.
 java.util.List<VFile> listFiles()
          Returns a list of all the child files in this folder.
 java.util.List<VFolder> listFolders()
          Returns a list of all the child folders in this folder.
 VFolder make()
          Makes this folder in the volume.
 
Methods inherited from class org.millscript.commons.vfs.AbstractVFolder
appendRelativePath, appendRelativePathOnVolume, appendURI, chroot, decorate, make, resolveAsFile, resolveAsFolder, resolveAsVolume, toLocal, toString, toVolume
 
Methods inherited from class org.millscript.commons.vfs.AbstractVEntry
appendAbsolutePath, appendAbsolutePathOnVolume, getAbsolutePath, getAbsolutePathOnVolume, getMIMEType, getMIMETypeHandler, getName, getParent, getRelativePath, getRelativePathOnVolume, getURI, getVolume
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.millscript.commons.vfs.VEntry
appendAbsolutePath, appendAbsolutePathOnVolume, getAbsolutePath, getAbsolutePathOnVolume, getMIMEType, getMIMETypeHandler, getName, getParent, getRelativePath, getRelativePathOnVolume, getURI, getVolume
 

Method Detail

checkVEntry

public VEntry checkVEntry(java.lang.String segment)
Description copied from interface: VFolder
Returns the entry for the child with the specified name, but only if it exists and throws an exception otherwise.

Parameters:
segment - the name of the required child
Returns:
the VEntry for the specified child
See Also:
VFolder.checkVEntry(java.lang.String)

checkVFile

public HttpFile checkVFile(java.lang.String segment)
Description copied from interface: VFolder
Returns the entry for the child file with the specified name, but only if it exists and throws an exception otherwise.

Parameters:
segment - the name of the required child file
Returns:
the VFile for the specified child file
See Also:
VFolder.checkVFile(java.lang.String)

checkVFolder

public HttpFolder checkVFolder(java.lang.String segment)
Description copied from interface: VFolder
Returns the entry for the child folder with the specified name, but only if it exists and throws an exception otherwise.

Parameters:
segment - the name of the required child folder
Returns:
the VFolder for the specified child
See Also:
VFolder.checkVFolder(java.lang.String)

exists

public boolean exists()
Description copied from interface: VEntry
Tests to see if the entry exits. This method is specific to the type of entry represented. For instance, if the entry is a file this method will only be true if the entry exists and is a file.

Returns:
true if this entry exits and false otherwise
See Also:
VEntry.exists()

getVFile

public HttpFile getVFile(java.lang.String segment)
Description copied from interface: VFolder
Returns the entry for the child file with the specified name.

Parameters:
segment - the name of the required child file
Returns:
the VFile for the specified child file
See Also:
VFolder.getVFile(java.lang.String)

getVFolder

public HttpFolder getVFolder(java.lang.String segment)
Description copied from interface: VFolder
Returns the entry for the child folder with the specified name.

Parameters:
segment - the name of the required child folder
Returns:
the VFolder for the specified child
See Also:
VFolder.getVFolder(java.lang.String)

listEntries

public java.util.List<VEntry> listEntries()
Description copied from interface: VFolder
Returns a list of all the child entries in this folder.

Returns:
a List of all the child entries in this folder
See Also:
VFolder.listEntries()

listFiles

public java.util.List<VFile> listFiles()
Description copied from interface: VFolder
Returns a list of all the child files in this folder.

Returns:
a List of all the child files in this folder.
See Also:
VFolder.listFiles()

listFolders

public java.util.List<VFolder> listFolders()
Description copied from interface: VFolder
Returns a list of all the child folders in this folder.

Returns:
a List of all the child folders in this folder.
See Also:
VFolder.listFolders()

make

public VFolder make()
Description copied from interface: VFolder
Makes this folder in the volume. This will also make any required parent folders. If this method succeeds you are guaranteed that the folder has been made.

Returns:
this folder if it was successfully made
See Also:
VFolder.make()


Copyright © 2005-2007 Open World Ltd. All Rights Reserved.