org.mockftpserver.fake.filesystem
Interface FileSystemEntry

All Known Implementing Classes:
AbstractFileSystemEntry, DirectoryEntry, FileEntry

public interface FileSystemEntry

Interface for an entry within a fake file system, representing a single file or directory.

Version:
$Revision: 182 $ - $Date: 2008-11-30 21:37:49 -0500 (Sun, 30 Nov 2008) $
Author:
Chris Mair

Method Summary
 FileSystemEntry cloneWithNewPath(String path)
          Return a new FileSystemEntry that is a clone of this object, except having the specified path
 String getGroup()
           
 Date getLastModified()
          Return the timestamp Date for the last modification of this file system entry
 String getName()
          Return the file name or directory name (no path) for this entry
 String getOwner()
           
 String getPath()
          Return the path for this file system entry
 Permissions getPermissions()
           
 long getSize()
          Return the size of this file system entry
 boolean isDirectory()
          Return true if this entry represents a directory, false otherwise
 void lockPath()
          Lock down the path so it cannot be changed
 void setLastModified(Date lastModified)
          Set the timestamp Date for the last modification of this file system entry
 

Method Detail

isDirectory

boolean isDirectory()
Return true if this entry represents a directory, false otherwise

Returns:
true if this file system entry is a directory, false otherwise

getPath

String getPath()
Return the path for this file system entry

Returns:
the path for this file system entry

getName

String getName()
Return the file name or directory name (no path) for this entry

Returns:
the file name or directory name (no path) for this entry

getSize

long getSize()
Return the size of this file system entry

Returns:
the file size in bytes

getLastModified

Date getLastModified()
Return the timestamp Date for the last modification of this file system entry

Returns:
the last modified timestamp Date for this file system entry

setLastModified

void setLastModified(Date lastModified)
Set the timestamp Date for the last modification of this file system entry

Parameters:
lastModified - - the lastModified value, as a Date

getOwner

String getOwner()
Returns:
the username of the owner of this file system entry

getGroup

String getGroup()
Returns:
the name of the owning group for this file system entry

getPermissions

Permissions getPermissions()
Returns:
the Permissions for this file system entry

cloneWithNewPath

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

lockPath

void lockPath()
Lock down the path so it cannot be changed



Copyright © 2014. All rights reserved.