com.plumtree.openfoundation.io
Class XPFileSystemObject

java.lang.Object
  extended by com.plumtree.openfoundation.io.XPFileSystemObject
Direct Known Subclasses:
XPDirectory, XPFile

public abstract class XPFileSystemObject
extends java.lang.Object

XPFileSystemObject is the base class for XPFile and XPDirectory and it contains methods that are common to file and directory manipulation.


Constructor Summary
XPFileSystemObject()
           
 
Method Summary
abstract  void Delete()
          Delete this file/directory.
abstract  boolean Exists()
          Returns true if this file/directory exists; false otherwise.
static XPFileSystemObject GetExistingPath(java.lang.String absolutePath)
          Creates a new XPFile or XPDirectory based on the given path.
abstract  java.lang.String GetFullPath()
          Returns the full path for this file/directory (e.g.
abstract  XPDateTime GetLastModifiedTime()
          Returns the last modified time of this file system object.
abstract  java.lang.String GetName()
          Returns the name of this file/directory(e.g.
abstract  XPDirectory GetParent()
          Returns an XPDirectory representing the directory this object resides in.
static java.lang.String GetPathSeparator()
          Returns the character that is used as a delimiter between the section of the path (on Windows, this should return "\"; on most UNIX platforms this should return "/").
abstract  boolean IsDirectory()
          Returns a boolean value that determines if this object is a directory or not.
abstract  boolean IsHidden()
          Returns a boolean value that determines if this file system object is hidden.
abstract  boolean IsReadOnly()
          Returns a boolean value that determines if this file system object is read only or not.
abstract  boolean SetReadOnly()
          Returns a boolean value that determines if the Readonly property is set or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPFileSystemObject

public XPFileSystemObject()
Method Detail

Delete

public abstract void Delete()
Delete this file/directory.


Exists

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

Returns:
true if this file/directory exists; false otherwise

GetFullPath

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

Returns:
full path for this file or directory

GetName

public abstract java.lang.String GetName()
Returns the name of this file/directory(e.g. "file.txt")

Returns:
name of this file/directory

GetParent

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

Returns:
parent Directory where this file/directory resides in.

IsDirectory

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

Returns:
true if this object exists and is a directory; false otherwise

GetPathSeparator

public static java.lang.String GetPathSeparator()
Returns the character that is used as a delimiter between the section of the path (on Windows, this should return "\"; on most UNIX platforms this should return "/").

Returns:
character that delimits the path

GetLastModifiedTime

public abstract XPDateTime GetLastModifiedTime()
Returns the last modified time of this file system object.

Returns:
XPDateTime that represents the last modified time of this file system object.

SetReadOnly

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

Returns:
true if the Readonly property is set; false otherwise

IsReadOnly

public abstract boolean IsReadOnly()
Returns a boolean value that determines if this file system object is read only or not.

Returns:
true if this file system object exists and is read only

IsHidden

public abstract boolean IsHidden()
Returns a boolean value that determines if this file system object is hidden.

Returns:
true if the file is hidden; false otherwise

GetExistingPath

public static XPFileSystemObject GetExistingPath(java.lang.String absolutePath)
                                          throws XPFileNotFoundException
Creates a new XPFile or XPDirectory based on the given path.

Parameters:
absolutePath - - the absolute file path to retrieve
Returns:
an object corresponding to the filepath you chose
Throws:
XPFileNotFoundException - - if the path doesn't exist


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