com.plumtree.openfoundation.io
Class XPDirectory

java.lang.Object
  extended by com.plumtree.openfoundation.io.XPFileSystemObject
      extended by com.plumtree.openfoundation.io.XPDirectory

public class XPDirectory
extends XPFileSystemObject

XPDirectory is an abstract representation of a directory pathname.


Constructor Summary
XPDirectory(java.lang.String directoryName)
          Create a new directory object (not the actual file system directory) by converting the given pathname string into an abstract pathname.
 
Method Summary
 void Create()
          Create a subdirectory named by this abstract path name.
 void Delete()
          Delete this directory.
 boolean Exists()
          Returns true if this directory exists; false otherwise.
 XPFileSystemObject GetChild(java.lang.String name)
          Returns a child directory or file that is represented by the name.
 XPFileSystemObject[] GetChildren()
          Returns an enumerator of XPFileSystemObjects of all files and sub-directories of this directory.
 java.lang.String GetFullPath()
          Returns the full path for this directory (e.g.
 XPDateTime GetLastModifiedTime()
          Returns the last modified time of this directory.
 java.lang.String GetName()
          Returns the name of this directory (e.g.
 XPDirectory GetParent()
          Returns an XPDirectory representing the directory this directory resides in.
 java.io.File GetUnderlyingObject()
          Returns the platform specific object that this class wraps.
 boolean IsDirectory()
          Returns a boolean value that determines if this object is a directory or not.
 boolean IsHidden()
          Returns a boolean value that determines if this directory is hidden.
 boolean IsReadOnly()
          Returns a boolean value that determines if this directory is read only or not.
 boolean SetReadOnly()
          Returns a boolean value that determines if the Readonly property is set or not.
 
Methods inherited from class com.plumtree.openfoundation.io.XPFileSystemObject
GetExistingPath, GetPathSeparator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPDirectory

public XPDirectory(java.lang.String directoryName)
Create a new directory object (not the actual file system directory) by converting the given pathname string into an abstract pathname.

Parameters:
directoryName - pathname of the directory
Method Detail

Create

public void Create()
Create a subdirectory named by this abstract path name.


Delete

public void Delete()
Delete this directory.

Specified by:
Delete in class XPFileSystemObject

Exists

public boolean Exists()
Returns true if this directory exists; false otherwise.

Specified by:
Exists in class XPFileSystemObject
Returns:
true if and only if the directory denoted by this abstract pathname exists; false otherwise

GetChild

public XPFileSystemObject GetChild(java.lang.String name)
Returns a child directory or file that is represented by the name.

Parameters:
name - pathname of the child object (File or Directory)
Returns:
An abstract representation (File or Directory) of the child object

GetChildren

public XPFileSystemObject[] GetChildren()
Returns an enumerator of XPFileSystemObjects of all files and sub-directories of this directory.

Returns:
An array of abstract objects that represent the children in this directory

GetFullPath

public java.lang.String GetFullPath()
Returns the full path for this directory (e.g. "c:\somedir\somedir2\")

Specified by:
GetFullPath in class XPFileSystemObject
Returns:
Full pathname of this directory

GetName

public java.lang.String GetName()
Returns the name of this directory (e.g. "somedir2")

Specified by:
GetName in class XPFileSystemObject
Returns:
Name of this directory

GetParent

public XPDirectory GetParent()
Returns an XPDirectory representing the directory this directory resides in.

Specified by:
GetParent in class XPFileSystemObject
Returns:
An instance of XPDirectory that this directory resides in

GetUnderlyingObject

public java.io.File GetUnderlyingObject()
Returns the platform specific object that this class wraps.

Returns:
An instance of File class

IsDirectory

public boolean IsDirectory()
Returns a boolean value that determines if this object is a directory or not.

Specified by:
IsDirectory in class XPFileSystemObject
Returns:
true if the file path represented by the XPDirectory exists and is a directory; false otherwise

GetLastModifiedTime

public XPDateTime GetLastModifiedTime()
Returns the last modified time of this directory.

Specified by:
GetLastModifiedTime in class XPFileSystemObject
Returns:
An instance of XPDateTime that represents the last modified time of this directory.

SetReadOnly

public boolean SetReadOnly()
Returns a boolean value that determines if the Readonly property is set or not.

Specified by:
SetReadOnly in class XPFileSystemObject
Returns:
true if the Readonly property is set; false otherwise

IsReadOnly

public boolean IsReadOnly()
Returns a boolean value that determines if this directory is read only or not.

Specified by:
IsReadOnly in class XPFileSystemObject
Returns:
true if this directory exists and is read only

IsHidden

public boolean IsHidden()
Returns a boolean value that determines if this directory is hidden.

Specified by:
IsHidden in class XPFileSystemObject
Returns:
true if the directory is hidden; false otherwise


Copyright © 2002, 2003, 2004 Plumtree Software Inc. All Rights Reserved.