|
 |
|
|
org.eclipse.rse.subsystems.files.core.subsystems
Class RemoteFileRoot
java.lang.Object
org.eclipse.rse.subsystems.files.core.subsystems.RemoteFile
org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileRoot
-
All Implemented Interfaces:
-
Comparable,
IAdaptable,
ISchedulingRule,
ISystemContainer,
IRemoteContainer,
IRemotePropertyHolder,
IRemoteFile
-
public class RemoteFileRoot
- extends
RemoteFile
A root node used to drive a CheckboxTreeAndListGroup, or any viewer which
takes a root which should return a single IRemoteFile object in the initial
getChildren query.
Methods inherited from class org.eclipse.rse.subsystems.files.core.subsystems.
RemoteFile
|
contains,
containsFilterKey,
copyContentsTo,
equals,
getAbsolutePathPlusConnection,
getAdapter,
getAllFilterStrings,
getComment,
getContents,
getContents,
getContext,
getEncoding,
getExtension,
getFile,
getFilterString,
getHost,
getHostName,
getLabel,
getLastModifiedDate,
getLineSeparator,
getParentRemoteFile,
getParentRemoteFileSubSystem,
getParentRemoteFileSubSystemConfiguration,
getProperties,
getProperty,
getSeparator,
getSeparatorChar,
hasContents,
hasContents,
isAncestorOf,
isArchive,
isBinary,
isConflicting,
isDescendantOf,
isExecutable,
isLink,
isPropertyStale,
isStale,
isText,
isUnix,
markAllPropertiesStale,
markPropertyStale,
markStale,
markStale,
replaceContent,
setContents,
setEncoding,
setFile,
setFilterString,
setIsContainer,
setLabel,
setParentRemoteFile,
setProperties,
setProperty,
toString
|
RemoteFileRoot
public RemoteFileRoot(
IRemoteFile rootFile)
- Constructor when root is known
RemoteFileRoot
public RemoteFileRoot()
- Constructor when root is not known.
Client must call
setRootFile(IRemoteFile) before any
get.. calls in this class are actually used.
getRootFile
public
IRemoteFile getRootFile()
- Return the root file node
-
setRootFile
public void setRootFile(
IRemoteFile rootFile)
- Reset the root file node
-
getRootFiles
public
IRemoteFile[] getRootFiles()
- Return the root file node as an array of 1
-
getName
public
String getName()
-
Description copied from interface:
IRemoteFile
- Get unqualified file name. No root and no path.
If this object represents only a root drive, this is the same as getRoot().
-
compareTo
public int compareTo(
Object o)
-
Description copied from class:
RemoteFile
- Compare one remote file to another. This enables us to sort the files so they
are shown folders-first, and in alphabetical order.
-
-
Specified by:
-
compareTo
in interface
Comparable
-
Specified by:
-
compareTo
in interface
IRemoteFile
-
Overrides:
-
compareTo
in class
RemoteFile
-
isVirtual
public boolean isVirtual()
-
showBriefPropertySet
public boolean showBriefPropertySet()
-
Description copied from interface:
IRemoteFile
- Querying properties for the property sheet can be expensive on some operating systems.
By default all properties are shown on the property sheet for this object, unless true
is returned from this query, in which only a couple properties are shown.
-
getParentPath
public
String getParentPath()
-
Description copied from interface:
IRemoteFile
- Get fully qualified path and name of folder containing this file or folder.
Returns the root and path. No file name, and no ending separator.
If this object represent only a root drive, this returns null;
Example: c:\folder1\folder2\file1.ext results in c:\folder1\folder2
-
getParentNoRoot
public
String getParentNoRoot()
-
Description copied from interface:
IRemoteFile
- Get fully qualified path and name of folder containing this file or folder, minus the root.
Returns the path. No root prefix. No file name, and no ending separator.
If this object represent only a root drive, this returns null;
Example: c:\folder1\folder2\file1.ext results in folder1\folder2
-
getRoot
public
String getRoot()
-
Description copied from interface:
IRemoteFile
- Get the root part of the name.
- Example:
c:\folder1\folder2\file1.ext results in c:\
- Example:
/folder1/folder2/file1.ext results in /
-
getParentName
public
String getParentName()
-
Description copied from interface:
IRemoteFile
- Get the unqualified name of the parent directory containing this file or folder.
Compare this to getParent() that returns the fully qualified parent directory.
If this object represents only a root drive, this returns null.
Example: c:\folder1\folder2\file1.ext results in folder2
-
isRoot
public boolean isRoot()
-
Description copied from interface:
IRemoteFile
- Returns true if this represents a root folder (eg: c:\\ or /).
-
isDirectory
public boolean isDirectory()
-
Description copied from interface:
IRemoteFile
- Returns true if this represents a folder (eg: c:\\folder)
-
isFile
public boolean isFile()
-
Description copied from interface:
IRemoteFile
- Returns true if this represents a file, versus a root or folder
-
isHidden
public boolean isHidden()
-
Description copied from interface:
IRemoteFile
- Returns true if this is a hidden file.
-
canRead
public boolean canRead()
-
Description copied from interface:
IRemoteFile
- Returns true if the application can read this file.
-
canWrite
public boolean canWrite()
-
Description copied from interface:
IRemoteFile
- Returns true if the application can write to this file.
-
exists
public boolean exists()
-
Description copied from interface:
IRemoteFile
- Returns true if this folder or file actually exists.
-
getLastModified
public long getLastModified()
-
Description copied from interface:
IRemoteFile
- Returns the time (in milliseconds since epoch) this file was last modified.
-
getLength
public long getLength()
-
Description copied from interface:
IRemoteFile
- Returns the length, in bytes, of this file.
-
showReadOnlyProperty
public boolean showReadOnlyProperty()
-
Description copied from interface:
IRemoteFile
- Returns true if the ReadOnly Property should be shown in the property page.
-
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 "symbolic link(....):resolvedPath".
The resolvedPath is the path that the link resolves to.
A symbolic link that resolves to an executable would appear as
"symbolic link(executable(...)):resolvedPath".
By default this should just return "file" or "directory".
-
-
Returns:
- the classification, or "unknown", or
null if not classifiable.
getAbsolutePath
public
String getAbsolutePath()
-
Description copied from interface:
IRemoteFile
- Get fully qualified name: root plus path plus name. No connection name.
-
-
Returns:
- the fully qualified path for uniquely addressing this file
on the remote host. Never returns
null . -
Since:
- 3.0
getCanonicalPath
public
String getCanonicalPath()
-
Description copied from interface:
IRemoteFile
- Returns the canonical path of the remote file.
-
-
Returns:
- the resolved path if the file is a symbolic link, or
getHostFile
public
IHostFile getHostFile()
-
getPermissions
public
IHostFilePermissions getPermissions()
- Override this to provide permissions
-
-
Specified by:
-
getPermissions
in interface
IRemoteFile
-
Overrides:
-
getPermissions
in class
RemoteFile
-
-
Returns:
- the permissions
Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.
|
|
|