com.starbase.util
Class FileAccess

java.lang.Object
  |
  +--com.starbase.util.FileAccess
Direct Known Subclasses:
NativeFileAccess, UnixFileAccess

public abstract class FileAccess
extends java.lang.Object

An interface to obtain certain abstract file properties.


Constructor Summary
FileAccess()
           
 
Method Summary
 boolean equals(java.lang.Object source)
          returns true if this object instance is equal to the source
 boolean getCanWrite(java.lang.String file)
          Return true if the file is writable by the user.
abstract  boolean getIsExecutable(java.lang.String file)
          Return true if the file is "executable" by the user.
abstract  long getLastModified(java.lang.String file)
          Return the the file's last modified time.
 int hashCode()
          returns a unique hash for all instances of this type
abstract  void setCanWrite(java.lang.String file, boolean value)
          Change whether or not the local file can be modified.
abstract  void setIsExecutable(java.lang.String file, boolean executable)
          Change whether or not the specified file should be marked "executable".
abstract  void setLastModified(java.lang.String file, long time)
          Change the the file's last modified time.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileAccess

public FileAccess()
Method Detail

getLastModified

public abstract long getLastModified(java.lang.String file)
                              throws java.io.IOException
Return the the file's last modified time. Value is in milliseconds since the epoch (00:00:00 GMT, January 1, 1970).

Parameters:
file - the specified file
Throws:
java.io.IOException - if an I/0 error occurs trying to access the file.

setLastModified

public abstract void setLastModified(java.lang.String file,
                                     long time)
                              throws java.io.IOException
Change the the file's last modified time. Value is in milliseconds since the epoch (00:00:00 GMT, January 1, 1970).

Parameters:
file - the specified file
time - the new file time
Throws:
java.io.IOException - if an I/0 error occurs trying to access the file.

getCanWrite

public boolean getCanWrite(java.lang.String file)
                    throws java.io.IOException
Return true if the file is writable by the user.

Parameters:
file - the specified file
Throws:
java.io.IOException - if an I/0 error occurs trying to access the file.

setCanWrite

public abstract void setCanWrite(java.lang.String file,
                                 boolean value)
                          throws java.io.IOException
Change whether or not the local file can be modified.

Parameters:
file - the specified file
value - true if the file should be writable and false if not
Throws:
java.io.IOException - if an I/0 error occurs trying to access the file.

getIsExecutable

public abstract boolean getIsExecutable(java.lang.String file)
                                 throws java.io.IOException
Return true if the file is "executable" by the user. The interpretation of what this means will vary by platform.

Parameters:
file - the specified file
Throws:
java.io.IOException - if an I/0 error occurs trying to access the file.

setIsExecutable

public abstract void setIsExecutable(java.lang.String file,
                                     boolean executable)
                              throws java.io.IOException
Change whether or not the specified file should be marked "executable".

Parameters:
file - the specified file
executable - true if the file should be marked executable
Throws:
java.io.IOException - if an I/0 error occurs trying to access the file.

equals

public boolean equals(java.lang.Object source)
returns true if this object instance is equal to the source

Overrides:
equals in class java.lang.Object
Parameters:
source - Object the source to comapre with
Returns:
boolean true if this object is equal to the source

hashCode

public int hashCode()
returns a unique hash for all instances of this type

Overrides:
hashCode in class java.lang.Object
Returns:
int a unique hash for all instances of this type


StarTeam SDK 10.4, Build 36
Copyright © 2003-2008 Borland Software Corporation. All rights reserved.