Index: src/eu/geclipse/core/filesystem/internal/filesystem/GEclipseFileStore.java
===================================================================
--- src/eu/geclipse/core/filesystem/internal/filesystem/GEclipseFileStore.java (revision 14212)
+++ src/eu/geclipse/core/filesystem/internal/filesystem/GEclipseFileStore.java (working copy)
@@ -15,6 +15,7 @@
package eu.geclipse.core.filesystem.internal.filesystem;
+import java.io.File;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URI;
@@ -381,4 +382,30 @@
return new MasterMonitor( monitor, this.externalMonitor );
}
+ /**
+ * Provides a local representation of this file if the file is available
+ * locally. If the file can not be constructed or the file is not local
+ * null
is returned.
+ *
+ * When the {@link EFS#CACHE} flag is specified via the options, the
+ * underlying system generates a cached copy of this file.
+ *
+ * @param options the options can provide the {@link EFS#CACHE} flag
+ * @param monitor the monitor to use
+ * @return a local file or null
if the file couldn't be created
+ */
+ @Override
+ public File toLocalFile( int options, IProgressMonitor monitor )
+ throws CoreException
+ {
+ if( options == EFS.CACHE ) {
+ super.toLocalFile( options, monitor );
+ } else {
+ String schemeGEFS = this.slave.getFileSystem().getScheme();
+ if( schemeGEFS.equalsIgnoreCase( EFS.SCHEME_FILE ) ) {
+ return new File( this.slave.toURI() );
+ }
+ }
+ return null;
+ }
}