1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 07:35:24 +02:00

[179910] [api] Remove unneccesary download and upload methods from IRemoteFileSubSystem, and also from the subclass RemoteFileSubSystem.

This commit is contained in:
Kushal Munir 2007-03-29 10:33:58 +00:00
parent 97b3538695
commit d52ea9ba57
2 changed files with 3 additions and 2 deletions

View file

@ -19,6 +19,7 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
import org.eclipse.rse.services.files.RemoteFileException;
import org.eclipse.rse.services.files.RemoteFileSecurityException;
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
@ -87,7 +88,7 @@ class RemoteExporter {
*/
protected void writeFile(IFile file, IPath destinationPath) throws IOException, CoreException, RemoteFileSecurityException, RemoteFileException {
IRemoteFileSubSystem rfss = RemoteFileUtility.getFileSubSystem((IHost) as400);
rfss.upload(file.getLocation().makeAbsolute().toOSString(), destinationPath.toString(), null);
rfss.upload(file.getLocation().makeAbsolute().toOSString(), SystemEncodingUtil.ENCODING_UTF_8, destinationPath.toString(), System.getProperty("file.encoding"), null); //$NON-NLS-1$
}
/**

View file

@ -465,7 +465,7 @@ public class RemoteFileImportOperation extends WorkspaceModifyOperation {
{
encoding = "Cp" + encoding.substring(2); //$NON-NLS-1$
}
rfss.download(((UniFilePlus) fileObject).remoteFile, targetResource, encoding, null);
rfss.download(((UniFilePlus) fileObject).remoteFile, targetResource.getLocation().makeAbsolute().toOSString(), encoding, null);
try {
// refresh workspace with just added resource
targetResource.refreshLocal(IResource.DEPTH_ZERO, new SubProgressMonitor(monitor, 1, SubProgressMonitor.SUPPRESS_SUBTASK_LABEL));