Remote Systems
v6.4.1

com.ibm.etools.systems.localfilesubsys.impl
Class LocalFileImpl

java.lang.Object
  extended bycom.ibm.etools.systems.subsystems.impl.RemoteFileImpl
      extended bycom.ibm.etools.systems.localfilesubsys.impl.LocalFileImpl
All Implemented Interfaces:
Cloneable, Comparable, IAdaptable, IRemoteContainer, IRemoteFile, IRemoteFileMutable, IRemotePropertyHolder, ISystemContainer
Direct Known Subclasses:
LocalVirtualFileImpl

public class LocalFileImpl
extends RemoteFileImpl
implements IRemoteFile

Represents a local file object


Field Summary
static String copyright
           
 
Fields inherited from class com.ibm.etools.systems.subsystems.impl.RemoteFileImpl
_isStale, BINARY_FALSE, BINARY_TRUE, cacheAbsolutePath, canonicalPath, canRead, canWrite, classification, containingArchiveFullName, contents, context, debugMode, DIRECTORY_FALSE, DIRECTORY_TRUE, exists, fullyQualifiedName, isCached, isContainer, isDirectory, isHidden, isRoot, isVirtualFile, isVirtualFolder, label, lastModified, length, nameOnly, parentFile, pathOnly, properties, propertyStates, remoteObj, ROOT_FALSE, ROOT_TRUE, rootOnly, showReadOnly
 
Fields inherited from interface com.ibm.etools.systems.subsystems.IRemoteFile
CONNECTION_DELIMITER, ISROOT_NO, ISROOT_YES
 
Constructor Summary
LocalFileImpl(IRemoteFileContext context, File file, boolean isRoot, boolean isDirectory)
          Constructor that takes a context object containing important information.
 
Method Summary
 boolean canRead()
          Returns true if the application can read this file.
 boolean canWrite()
          Returns true if the application can write to this file.
 void clearCacheChecks()
           
 boolean exists()
          Returns true if this folder or file actually exists.
 String getClassification()
          Returns the classification of this file.
 String getComment()
           
 long getExpandedSize()
           
 File getFileWrapper()
          Return an object extending java.io.File and proxing this file.
 long getLastModified()
          Returns the time (in milliseconds since epoch) this file was last modified.
 long getLength()
          Returns the length, in bytes, of this file.
 boolean isHidden()
          Returns true if this is a hidden file.
 void setExists(boolean exists, boolean setCacheFlag)
          This method should not be used.
 void setFile(Object file)
          Internal method called by the subsystem.
 void setIsHidden(boolean flag)
          Internal method called by the subsystem.
 void setLastModified(long lastModified)
          Internal method called by the subsystem.
 
Methods inherited from class com.ibm.etools.systems.subsystems.impl.RemoteFileImpl
clearCache, compareTo, containsFilterKey, copyContentsTo, getAbsolutePath, getAbsolutePathPlusConnection, getAdapter, getAllFilterStrings, getCachedCopy, getCanonicalPath, getCompressedSize, getCompressionMethod, getCompressionRatio, getContainingArchiveFullName, getContents, getContents, getContext, getExtension, getFile, getFilterString, getLabel, getLastModifiedDate, getLineSeparator, getLocalAbsolutePath, getName, getParent, getParentName, getParentNoRoot, getParentRemoteFile, getParentRemoteFileSubSystem, getParentRemoteFileSubSystemFactory, getProperties, getProperty, getRoot, getSeparator, getSeparatorChar, getSystemConnection, hasContents, hasContents, isAncestorOf, isArchive, isBinary, isDescendantOf, isDirectory, isExecutable, isFile, isLink, isLocal, isPropertyStale, isRoot, isStale, isText, isUnix, isVirtual, isVirtualFile, isVirtualFolder, markAllPropertiesStale, markPropertyStale, markStale, replaceContent, setAbsolutePath, setCanRead, setCanWrite, setClassification, setContainingArchiveFullName, setContents, setExists, setFilterString, setIsContainer, setIsLocal, setLabel, setLength, setLocalAbsolutePath, setName, setNameOnly, setParentRemoteFile, setProperties, setProperty, setVirtualFile, setVirtualFolder, showBriefPropertySet, showReadOnlyProperty, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.etools.systems.subsystems.IRemoteFile
compareTo, getAbsolutePath, getAbsolutePathPlusConnection, getAllFilterStrings, getCanonicalPath, getCompressedSize, getCompressionMethod, getCompressionRatio, getExtension, getFile, getFilterString, getLabel, getLastModifiedDate, getLineSeparator, getName, getParent, getParentName, getParentNoRoot, getParentRemoteFile, getParentRemoteFileSubSystem, getRoot, getSeparator, getSeparatorChar, getSystemConnection, isAncestorOf, isArchive, isBinary, isDescendantOf, isDirectory, isExecutable, isFile, isLink, isRoot, isText, isVirtual, setFilterString, showBriefPropertySet, showReadOnlyProperty
 
Methods inherited from interface com.ibm.etools.systems.subsystems.IRemoteContainer
copyContentsTo, getContents, hasContents, replaceContent, setContents
 
Methods inherited from interface com.ibm.etools.systems.model.ISystemContainer
getContents, hasContents, isStale, markStale
 
Methods inherited from interface com.ibm.etools.systems.subsystems.IRemotePropertyHolder
getProperties, getProperty, isPropertyStale, markAllPropertiesStale, markPropertyStale, setProperties, setProperty
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Constructor Detail

LocalFileImpl

public LocalFileImpl(IRemoteFileContext context,
                     File file,
                     boolean isRoot,
                     boolean isDirectory)
Constructor that takes a context object containing important information.

Parameters:
context - An object holding contextual information about this object
See Also:
IRemoteFileContext
Method Detail

setFile

public void setFile(Object file)
Description copied from interface: IRemoteFileMutable
Internal method called by the subsystem.

Specified by:
setFile in interface IRemoteFileMutable
Overrides:
setFile in class RemoteFileImpl

getFileWrapper

public File getFileWrapper()
Description copied from interface: IRemoteFile
Return an object extending java.io.File and proxing this file. The resulting File object only supports the non-streaming, non static methods.

Specified by:
getFileWrapper in interface IRemoteFile
Overrides:
getFileWrapper in class RemoteFileImpl

clearCacheChecks

public void clearCacheChecks()

exists

public boolean exists()
Description copied from interface: IRemoteFile
Returns true if this folder or file actually exists.

Specified by:
exists in interface IRemoteFile
Overrides:
exists in class RemoteFileImpl
See Also:
IRemoteFile.exists()

setExists

public void setExists(boolean exists,
                      boolean setCacheFlag)
This method should not be used. It will soon be deprecated (in 61).


getLength

public long getLength()
Description copied from interface: IRemoteFile
Returns the length, in bytes, of this file.

Specified by:
getLength in interface IRemoteFile
Overrides:
getLength in class RemoteFileImpl
See Also:
IRemoteFile.getLength()

setIsHidden

public void setIsHidden(boolean flag)
Description copied from class: RemoteFileImpl
Internal method called by the subsystem.

Specified by:
setIsHidden in interface IRemoteFileMutable
Overrides:
setIsHidden in class RemoteFileImpl
See Also:
RemoteFileImpl.setLastModified(long), RemoteFileImpl.setExists(boolean), RemoteFileImpl.setAbsolutePath(String, String, boolean, boolean), RemoteFileImpl.setCanRead(boolean), RemoteFileImpl.setCanWrite(boolean)

isHidden

public boolean isHidden()
Description copied from interface: IRemoteFile
Returns true if this is a hidden file.

Specified by:
isHidden in interface IRemoteFile
Overrides:
isHidden in class RemoteFileImpl

canRead

public boolean canRead()
Description copied from interface: IRemoteFile
Returns true if the application can read this file.

Specified by:
canRead in interface IRemoteFile
Overrides:
canRead in class RemoteFileImpl

canWrite

public boolean canWrite()
Description copied from interface: IRemoteFile
Returns true if the application can write to this file.

Specified by:
canWrite in interface IRemoteFile
Overrides:
canWrite in class RemoteFileImpl

getLastModified

public long getLastModified()
Description copied from interface: IRemoteFile
Returns the time (in milliseconds since epoch) this file was last modified.

Specified by:
getLastModified in interface IRemoteFile
Overrides:
getLastModified in class RemoteFileImpl
See Also:
IRemoteFile.getLastModified()

setLastModified

public void setLastModified(long lastModified)
Internal method called by the subsystem.

Specified by:
setLastModified in interface IRemoteFileMutable
Overrides:
setLastModified in class RemoteFileImpl
See Also:
RemoteFileImpl.setLength(long), RemoteFileImpl.setExists(boolean), RemoteFileImpl.setAbsolutePath(String, String, boolean, boolean)

getComment

public String getComment()
Specified by:
getComment in interface IRemoteFile
Overrides:
getComment in class RemoteFileImpl

getExpandedSize

public long getExpandedSize()
Specified by:
getExpandedSize in interface IRemoteFile
Overrides:
getExpandedSize in class RemoteFileImpl

getClassification

public String getClassification()
Description copied from interface: IRemoteFile
Returns the classification of this file. If the file is an executable, then "executable(...)" will be returned. If the file is a symbolic link then it will appear as "link(....):resolvedPath". The resolvedPath is the path that the link resolves to. A symbolic link that resolves to an executable would appear as "link(executable(...)):resolvedPath". By default this should just return "file".

Specified by:
getClassification in interface IRemoteFile
Overrides:
getClassification in class RemoteFileImpl
See Also:
IRemoteFile.getClassification()

Remote Systems
v6.4.1

Copyright © 2005 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.