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

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.servicesubsystem
Class AbstractRemoteFile

java.lang.Object
  extended by 

org.eclipse.rse.subsystems.files.core.subsystems.RemoteFile
      extended by 
org.eclipse.rse.subsystems.files.core.servicesubsystem.AbstractRemoteFile
All Implemented Interfaces:
Comparable, IAdaptable, ISchedulingRule, ISystemContainer, IRemoteContainer, IRemotePropertyHolder, IRemoteFile

public abstract class AbstractRemoteFile
extends RemoteFile


Field Summary
protected   String _classiciation
           
protected   IHostFile _hostFile
           
protected   FileServiceSubSystem _subSystem
           
 
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
AbstractRemoteFile ( FileServiceSubSystem subSystem, IRemoteFileContext context, IRemoteFile parent, IHostFile hostFile)
           
 
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 other)
          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.
  IHost getHost ()
          Return the connection this remote file is from.
  IHostFile getHostFile ()
           
  String getLabel ()
          Get the display name for 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.
  String getName ()
          Get unqualified file name.
  String getParentName ()
          Return the parent's name
  String getParentNoRoot ()
          Deprecated. - shouldn't need apis like this
  String getParentPath ()
          Get fully qualified path and name of folder containing this file or folder.
  IRemoteFileSubSystem getParentRemoteFileSubSystem ()
          Return the parent subsystem
  String getRoot ()
          Deprecated. - shouldn't need apis like this
 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 setHostFile ( IHostFile hostFile)
          Replacing the current associated IHostFile with a new one
 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, getHostName, getLastModifiedDate, getLineSeparator, getParentRemoteFile, getParentRemoteFileSubSystemConfiguration, getPermissions, 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
 
Methods inherited from interface org.eclipse.rse.subsystems.files.core.subsystems. IRemoteFile
getCanonicalPath, getClassification
 

Field Detail

_hostFile

protected 
IHostFile _hostFile

_subSystem

protected 
FileServiceSubSystem _subSystem

_classiciation

protected 
String _classiciation
Constructor Detail

AbstractRemoteFile

public AbstractRemoteFile(
FileServiceSubSystem subSystem,
                          
IRemoteFileContext context,
                          
IRemoteFile parent,
                          
IHostFile hostFile)
Method Detail

getParentRemoteFileSubSystem

public 
IRemoteFileSubSystem getParentRemoteFileSubSystem()
Description copied from class: RemoteFile
Return the parent subsystem

Specified by:
getParentRemoteFileSubSystem in interface IRemoteFile
Overrides:
getParentRemoteFileSubSystem in class RemoteFile
Returns:
the Subsystem holding this file.

getHost

public 
IHost getHost()
Description copied from class: RemoteFile
Return the connection this remote file is from.

Specified by:
getHost in interface IRemoteFile
Overrides:
getHost in class RemoteFile

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.

getLabel

public 
String getLabel()
Description copied from interface: IRemoteFile
Get the display name for this file. By default, this should be the same as the name If this object represents only a root drive, this is the same as getRoot().

Specified by:
getLabel in interface IRemoteFile
Overrides:
getLabel in class RemoteFile
See Also:
IRemoteFile.getLabel()

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().


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


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


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.


compareTo

public int compareTo(
Object other)
              throws 
ClassCastException
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
Throws:
ClassCastException

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.


getParentNoRoot

public 
String getParentNoRoot()
Deprecated. - shouldn't need apis like this

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()
Deprecated. - shouldn't need apis like this

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()
Return the parent's name


isHidden

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


isVirtual

public boolean isVirtual()

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.


showReadOnlyProperty

public boolean showReadOnlyProperty()
Description copied from interface: IRemoteFile
Returns true if the ReadOnly Property should be shown in the property page.


getHostFile

public 
IHostFile getHostFile()

setHostFile

public void setHostFile(
IHostFile hostFile)
Replacing the current associated IHostFile with a new one

Parameters:
hostFile - the new host file
Since:
3.0

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