nl.gx.webmanager.cms.element
Interface FileNode


public interface FileNode

Represents a single node (file or directory) in the tree of files shown by the directory element.


Method Summary
 java.util.Collection getChildren()
          Returns a collection of DirectoryElementNode that are children of the current node.
 java.lang.String getExtension()
          Returns the extension (on disk) of the node.
 long getFileSize()
          Returns the file size (on disk) of the node.
 java.util.Date getLastModified()
          Returns the date the file on disk was last modified.
 java.lang.String getName()
          Returns the name (on disk) of the node.
 int getPathDepth()
          Returns the depth of the path measured from the root directory of the directory element.
 java.lang.String getRelativePath()
          Returns the path relative to the root directory of the directory element.
 boolean isDirectory()
          Returns whether this node represents a directory or a file.
 

Method Detail

getName

java.lang.String getName()
Returns the name (on disk) of the node.

Returns:
the name of the node.

getExtension

java.lang.String getExtension()
Returns the extension (on disk) of the node.

Returns:
the name of the extension.

getRelativePath

java.lang.String getRelativePath()
Returns the path relative to the root directory of the directory element.

Returns:
the path relative to the root directory of the directory element

getPathDepth

int getPathDepth()
Returns the depth of the path measured from the root directory of the directory element.

Returns:
the depth of the path measured from the root directory of the directory element

isDirectory

boolean isDirectory()
Returns whether this node represents a directory or a file.

Returns:
whether this node is a directory

getLastModified

java.util.Date getLastModified()
Returns the date the file on disk was last modified.

Returns:
the dat the file on disk was last modified

getChildren

java.util.Collection getChildren()
Returns a collection of DirectoryElementNode that are children of the current node. If this node is not a directory, no children will be present

Returns:
the childnodes of the current node

getFileSize

long getFileSize()
Returns the file size (on disk) of the node.

Returns:
the file size (on disk) of the node. If this FileNode denotes a directory then the result undefined.


Copyright © 2007-2011 GX Software BV. All Rights Reserved.