com.sas.edir.content
Class FileManager.Link

java.lang.Object
  |
  +--java.io.File
        |
        +--com.sas.edir.content.FileManager.Link
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable
Enclosing class:
FileManager

protected static class FileManager.Link
extends java.io.File

Link extends java.io.File and provides a "first-line" defense that discourages inadvertant modifications. this is just a first line of defense... You can still create a file based on the Link's name and do with it what you will.

Version:
1.0
Author:
SAS
See Also:
Serialized Form

Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
 
Constructor Summary
FileManager.Link(java.io.File dir, java.lang.String name)
          Creates a Link instance that represents the file with the specified name in the specified directory.
FileManager.Link(java.io.File dir, java.lang.String name, FileManager.Key key)
          Creates a Link instance that represents the file with the specified name in the specified directory associating the specified key.
FileManager.Link(java.lang.String path)
          Creates a File instance that represents the file whose pathname is the given path argument.
FileManager.Link(java.lang.String path, FileManager.Key key)
          Creates a File instance that represents the file whose pathname is the given path argument associating the specified key.
FileManager.Link(java.lang.String path, java.lang.String name)
          Creates a File instance whose pathname is the pathname of the specified directory, followed by the separator character, followed by the name argument.
FileManager.Link(java.lang.String path, java.lang.String name, FileManager.Key key)
          Creates a File instance whose pathname is the pathname of the specified directory, followed by the separator character, followed by the name argument associating the specified key.
 
Method Summary
 boolean canWrite()
          Tests if the application can write to this file.
 boolean delete()
          Deletes the file specified by this object.
 boolean renameTo(java.io.File dest)
          Renames the file specified by this File object to have the pathname given by the File argument.
 
Methods inherited from class java.io.File
canRead, compareTo, compareTo, createNewFile, createTempFile, createTempFile, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getName, getParent, getParentFile, getPath, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, setLastModified, setReadOnly, toString, toURL
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileManager.Link

public FileManager.Link(java.io.File dir,
                        java.lang.String name)
Creates a Link instance that represents the file with the specified name in the specified directory.

FileManager.Link

public FileManager.Link(java.io.File dir,
                        java.lang.String name,
                        FileManager.Key key)
Creates a Link instance that represents the file with the specified name in the specified directory associating the specified key.

FileManager.Link

public FileManager.Link(java.lang.String path,
                        java.lang.String name)
Creates a File instance whose pathname is the pathname of the specified directory, followed by the separator character, followed by the name argument.

FileManager.Link

public FileManager.Link(java.lang.String path,
                        java.lang.String name,
                        FileManager.Key key)
Creates a File instance whose pathname is the pathname of the specified directory, followed by the separator character, followed by the name argument associating the specified key.

FileManager.Link

public FileManager.Link(java.lang.String path)
Creates a File instance that represents the file whose pathname is the given path argument.

FileManager.Link

public FileManager.Link(java.lang.String path,
                        FileManager.Key key)
Creates a File instance that represents the file whose pathname is the given path argument associating the specified key.
Method Detail

canWrite

public boolean canWrite()
Tests if the application can write to this file. This method returns false.
Overrides:
canWrite in class java.io.File

delete

public boolean delete()
Deletes the file specified by this object. If the target file to be deleted is a directory, it must be empty for deletion to succeed. This method returns false.
Overrides:
delete in class java.io.File

renameTo

public boolean renameTo(java.io.File dest)
Renames the file specified by this File object to have the pathname given by the File argument. This method returns false.
Overrides:
renameTo in class java.io.File