Community
Participate
Working Groups
Created attachment 95501 [details] Implementation of the IFileStore.toLocalFile(...) method While developing some testcode for an IVirtualOrganization i needed to test the loading mechanisem from the GEclipseFileSystem and thereby required to create temporary objects to work upon. Since the API of the GEclipseFileStore is limited to internal use, it is not possible to get ahold of the information embedded in the slave, which contains a reference to the location of the data on the local disc. Therefore the currently unimplemented method IFileStore.toLocalFile(...) should be implemented to make such testing scenarios possible. The patch provided exposes the local location via a File object if the scheme of the GEclipseFileSystem is local (aka uses "file").
Your provided implementation does only cover parts of the method specification. The specification says: 1) return only null if fs is not local and EFS.CACHE is not specified. 2) return a File with the same state as the original file. So in fact to make a proper implementation you should support also the CACHE option and you should take care of providing a copy with the same state. If this functionality is really needed at the moment we may accept the patch. Nevertheless I would prefer to have an implementation that fully follows the specification.
Created attachment 95511 [details] Implementation of the IFileStore.toLocalFile(...) method (keeping CACHE mechanism)
As the CACHE Flag is described as being the default implementation, i did not see the immediate necessity to carry this functionality over. On a second thought... Sure, why not? It is easy to implement and maybe useful in the future. A second patch is appended incorporating these changes.