mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-01 12:43:26 +02:00
[170916] [plan][efs] Fix and improve the RSE EFS integration. Remove unnecessary implementation of local file cache.
This commit is contained in:
parent
447c0b0d87
commit
5577903f02
1 changed files with 0 additions and 48 deletions
|
@ -416,54 +416,6 @@ public class RSEFileStore extends FileStore implements IFileStore
|
|||
return new RSEFileStore(this, _subSystem, _absolutePath, name);
|
||||
}
|
||||
|
||||
public File toLocalFile(int options, IProgressMonitor monitor) throws CoreException
|
||||
{
|
||||
if (options == EFS.CACHE) {
|
||||
return super.toLocalFile(options, monitor);
|
||||
}
|
||||
else {
|
||||
|
||||
if (!_subSystem.isConnected()) {
|
||||
|
||||
try {
|
||||
_subSystem.connect(monitor);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new CoreException(new Status(IStatus.ERROR, Activator.getDefault().getBundle().getSymbolicName(), "Could not connect to subsystem", e)); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
// at this point get the live remote file
|
||||
try {
|
||||
_remoteFile = _subSystem.getRemoteFileObject(_absolutePath);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new CoreException(new Status(IStatus.ERROR, Activator.getDefault().getBundle().getSymbolicName(), "Could not get remote file", e)); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
if (_remoteFile.exists()) {
|
||||
|
||||
RSEFileCache cache = RSEFileCache.getInstance();
|
||||
InputStream inputStream = null;
|
||||
|
||||
try {
|
||||
|
||||
if (_remoteFile.isFile()) {
|
||||
inputStream = new RSEFileStoreInputStream(_subSystem.getInputStream(_remoteFile.getParentRemoteFileSubSystem().getHost().getHostName(), _remoteFile.getName(), true, monitor));
|
||||
}
|
||||
|
||||
return cache.writeToCache(_remoteFile, inputStream);
|
||||
}
|
||||
catch (SystemMessageException e) {
|
||||
throw new CoreException(new Status(IStatus.ERROR, Activator.getDefault().getBundle().getSymbolicName(), "Could not get input stream", e)); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void delete(int options, IProgressMonitor monitor) throws CoreException
|
||||
{
|
||||
if (!_subSystem.isConnected()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue