RSE
Release 3.3

org.eclipse.rse.subsystems.files.core.model
Class RemoteFileUtility

java.lang.Object
  extended by org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility

public class RemoteFileUtility
extends Object

Public utility class for dealing with remote file subsystems.


Constructor Summary
RemoteFileUtility()
           
 
Method Summary
static IRemoteFileSubSystem getFileSubSystem(IHost connection)
          Return the first remote file subsystem associated with a connection.
static IRemoteFileSubSystemConfiguration getFileSubSystemConfiguration(IRSESystemType systemType)
          Return the first remote file subsystem configuration associated with a system type.
static IRemoteFileSubSystem[] getFileSubSystems(IHost connection)
          Return the list of file subsystems associated with a connection.
static String getSourceEncoding(IFile file)
          Return the workspace encoding for a given IFile.
static ISystemFileTransferModeRegistry getSystemFileTransferModeRegistry()
          Return the global SystemFileTransferModeRegistry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteFileUtility

public RemoteFileUtility()
Method Detail

getSourceEncoding

public static String getSourceEncoding(IFile file)
Return the workspace encoding for a given IFile. In none is specified for this particular file, then the default charset is used. If an exception is hit trying to get the encoding, then the fallback is UTF-8

Since:
3.1

getFileSubSystem

public static IRemoteFileSubSystem getFileSubSystem(IHost connection)
Return the first remote file subsystem associated with a connection.

Parameters:
connection - the connection to query.
Returns:
an IRemoteFileSubSystem instance, or null if no file subsystem is configured with the given connection.

getFileSubSystems

public static IRemoteFileSubSystem[] getFileSubSystems(IHost connection)
Return the list of file subsystems associated with a connection.

Parameters:
connection - the connection to query.
Returns:
a list of IRemoteFileSubSystem instances (may be empty).

getFileSubSystemConfiguration

public static IRemoteFileSubSystemConfiguration getFileSubSystemConfiguration(IRSESystemType systemType)
Return the first remote file subsystem configuration associated with a system type.

Parameters:
systemType - the system type to query.
Returns:
an IRemoteFileSubSystemConfiguration instance, or null if no file subsystem is configured with the given system type.

getSystemFileTransferModeRegistry

public static ISystemFileTransferModeRegistry getSystemFileTransferModeRegistry()
Return the global SystemFileTransferModeRegistry.

Returns:
the global SystemFileTransferModeRegistry.
Since:
3.0

RSE
Release 3.3

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