Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.subsystems.files.core.subsystems
Class RemoteFileRoot


java.lang.Object
  extended by 

org.eclipse.rse.subsystems.files.core.subsystems.RemoteFile
      extended by 
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.


Field Summary
 
Fields inherited from class org.eclipse.rse.subsystems.files.core.subsystems. RemoteFile
_contents, _context, _isStale, _label, _parentFile, isContainer, properties, propertyStates, remoteObj
 
Fields inherited from interface org.eclipse.rse.subsystems.files.core.subsystems. IRemoteFile
CONNECTION_DELIMITER, ISROOT_NO, ISROOT_YES
 
Constructor Summary
RemoteFileRoot ()
          Constructor when root is not known.
RemoteFileRoot ( IRemoteFile rootFile)
          Constructor when root is known
 
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.
 int compareTo ( Object o)
          Compare one remote file to another.
 boolean exists ()
          Returns true if this folder or file actually exists.
  String getAbsolutePath ()
          Get fully qualified name: root plus path plus name.
  String getCanonicalPath ()
          Returns the canonical path of the remote file.
  String getClassification ()
          Returns the classification of this file.
  IHostFile getHostFile ()
           
 long getLastModified ()
          Returns the time (in milliseconds since epoch) this file was last modified.
 long getLength ()
          Returns the length, in bytes, of this file.
  String getName ()
          Get unqualified file name.
  String getParentName ()
          Get the unqualified name of the parent directory containing this file or folder.
  String getParentNoRoot ()
          Get fully qualified path and name of folder containing this file or folder, minus the root.
  String getParentPath ()
          Get fully qualified path and name of folder containing this file or folder.
  IHostFilePermissions getPermissions ()
          Override this to provide permissions
  String getRoot ()
          Get the root part of the name.
  IRemoteFile getRootFile ()
          Return the root file node
  IRemoteFile[] getRootFiles ()
          Return the root file node as an array of 1
 boolean isDirectory ()
          Returns true if this represents a folder (eg: c:\\folder)
 boolean isFile ()
          Returns true if this represents a file, versus a root or folder
 boolean isHidden ()
          Returns true if this is a hidden file.
 boolean isRoot ()
          Returns true if this represents a root folder (eg: c:\\ or /).
 boolean isVirtual ()
           
 void setRootFile ( IRemoteFile rootFile)
          Reset the root file node
 boolean showBriefPropertySet ()
          Querying properties for the property sheet can be expensive on some operating systems.
 boolean showReadOnlyProperty ()
          Returns true if the ReadOnly Property should be shown in the property page.
 
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
 
Methods inherited from class java.lang. Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.

Method Detail

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

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire