org.aludratest.service.file
Class FileInfo

java.lang.Object
  extended by org.aludratest.service.file.FileInfo

public class FileInfo
extends Object

Provides elementary file information which might serve as filter criteria.

Author:
Volker Bergmann

Constructor Summary
FileInfo(org.apache.commons.vfs2.FileObject file)
          Constructor
 
Method Summary
 long getLastModifiedTime()
          Provides the time stamp of the last file modification.
 String getName()
          Provides the file name without path elements.
 String getPath()
          Provides the path relative from the FileService's root directory.
 long getSize()
          Provides the size of the file.
 boolean isDirectory()
          Tells if the file is a directory.
 String toString()
          Provides the file name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileInfo

public FileInfo(org.apache.commons.vfs2.FileObject file)
Constructor

Parameters:
file - the underlying FileObject.
Method Detail

getName

public String getName()
Provides the file name without path elements.

Returns:
the file name

getPath

public String getPath()
Provides the path relative from the FileService's root directory.

Returns:
the file path

isDirectory

public boolean isDirectory()
Tells if the file is a directory.

Returns:
true if a directory is referred, otherwise false

getSize

public long getSize()
Provides the size of the file.

Returns:
the size of the file

getLastModifiedTime

public long getLastModifiedTime()
Provides the time stamp of the last file modification.

Returns:
the time stamp of the last file modification

toString

public String toString()
Provides the file name.

Overrides:
toString in class Object


Copyright © 2015 aludratest.org. All rights reserved.