ome.tools
Class FileSystem

java.lang.Object
  extended by java.io.File
      extended by ome.tools.FileSystem
All Implemented Interfaces:
Serializable, Comparable<File>

public class FileSystem
extends File

Extends Sun Microsystems java.io.File for J2SE 5 only. This class provides methods that are available in version Java 2 Platform Standard Edition version 6.0. Only two of these methods are used for a specific purpose within this application. The methods are getTotalSpace() and getFreeSpace(). These methods will be used to monitor a specific filesystem and determine if maximum points may be exceeded.

Since:
3.0
Version:
$Revision$
Author:
David L. Whitehurst      david@glencoesoftware.com
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
 
Constructor Summary
FileSystem(File parent, String child)
          pass-thru constructor
FileSystem(String pathname)
          pass-thru constructor
FileSystem(String parent, String child)
          pass-thru constructor
FileSystem(URI uri)
          pass-thru constructor
 
Method Summary
 boolean equals(Object object)
          Public equals implementation based on name only (very loose equals)
 long free(String mountRoot)
          This method will return the free space in kilobytes TODO - resolve the slash mount
 int hashCode()
          Public hashcode implementation based on String hash() return
static void main(String[] args)
           
 String toString()
          Public toString implementation
 
Methods inherited from class java.io.File
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toURI, toURL
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileSystem

public FileSystem(String pathname)
pass-thru constructor

Parameters:
pathname -
See Also:
File.File(String)

FileSystem

public FileSystem(URI uri)
pass-thru constructor

Parameters:
uri -
See Also:
File.File(URI)

FileSystem

public FileSystem(String parent,
                  String child)
pass-thru constructor

Parameters:
parent -
child -
See Also:
File.File(String, String)

FileSystem

public FileSystem(File parent,
                  String child)
pass-thru constructor

Parameters:
parent -
child -
See Also:
File.File(File, String)
Method Detail

free

public long free(String mountRoot)
          throws RuntimeException
This method will return the free space in kilobytes TODO - resolve the slash mount

Returns:
long of free space
Throws:
RuntimeException

toString

public String toString()
Public toString implementation

Overrides:
toString in class File
Returns:

equals

public boolean equals(Object object)
Public equals implementation based on name only (very loose equals)

Overrides:
equals in class File
Parameters:
object -
Returns:

hashCode

public int hashCode()
Public hashcode implementation based on String hash() return

Overrides:
hashCode in class File
Returns:

main

public static void main(String[] args)
                 throws IOException
Throws:
IOException


OmeroJava Api

Version: 4.3.4-dbcbce5a-b4

Copyright © 2009 The University of Dundee. All Rights Reserved.