org.mockftpserver.fake.filesystem
Class DirectoryEntry

java.lang.Object
  extended by org.mockftpserver.fake.filesystem.AbstractFileSystemEntry
      extended by org.mockftpserver.fake.filesystem.DirectoryEntry
All Implemented Interfaces:
FileSystemEntry

public class DirectoryEntry
extends AbstractFileSystemEntry

File system entry representing a directory

Version:
$Revision: 199 $ - $Date: 2008-12-10 22:03:52 -0500 (Wed, 10 Dec 2008) $
Author:
Chris Mair

Constructor Summary
DirectoryEntry()
          Construct a new instance without setting its path
DirectoryEntry(String path)
          Construct a new instance with the specified value for its path
 
Method Summary
 FileSystemEntry cloneWithNewPath(String path)
          Return a new FileSystemEntry that is a clone of this object, except having the specified path
 long getSize()
          Return the size of this directory.
 boolean isDirectory()
          Return true to indicate that this entry represents a directory
 String toString()
           
 
Methods inherited from class org.mockftpserver.fake.filesystem.AbstractFileSystemEntry
getGroup, getLastModified, getName, getOwner, getPath, getPermissions, lockPath, setGroup, setLastModified, setOwner, setPath, setPermissions, setPermissionsFromString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DirectoryEntry

public DirectoryEntry()
Construct a new instance without setting its path


DirectoryEntry

public DirectoryEntry(String path)
Construct a new instance with the specified value for its path

Parameters:
path - - the value for path
Method Detail

isDirectory

public boolean isDirectory()
Return true to indicate that this entry represents a directory

Specified by:
isDirectory in interface FileSystemEntry
Specified by:
isDirectory in class AbstractFileSystemEntry
Returns:
true

getSize

public long getSize()
Return the size of this directory. This method returns zero.

Returns:
the file size in bytes

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

cloneWithNewPath

public FileSystemEntry cloneWithNewPath(String path)
Return a new FileSystemEntry that is a clone of this object, except having the specified path

Parameters:
path - - the new path value for the cloned file system entry
Returns:
a new FileSystemEntry that has all the same values as this object except for its path


Copyright © 2014. All rights reserved.