[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [geclipse-dev] gsiftp fetchInfo
|
Romain pisze:
When I call the exist() method after calling a fetchInfo on a gsiftp://
URI I get always false even if the matching store exist.
I think it is because the method is not implemented:
@Override
public IFileInfo fetchInfo( final int options, final IProgressMonitor
monitor )
throws CoreException {
Activator.consoleLog( " <--- retrieving file info: " +
this.uri.toString() ); //$NON-NLS-1$
if ( this.fileInfo == null ) {
// Perform file info retrieval
}
return this.fileInfo;
}
As far as I remember, this.fileInfo is always not null. But it's true,
that it does not contain real values. It's partially true, in fact.
There is a fake fileInfo only for IFileStores created by hand (usually
the first one), it's because some problems we encounter (mostly related
to the caching, asking for token during start of gEclipse etc.).
So, once you perform childStores, all children contain real values
(including #exists()=true)
Also I didn't figure out how to perform fetchInfo for a single file,
without listing whole directory. Hence, if you would like to download a
single file, you should perform this cumbersome usecase (in pseudocode):
fs = getFileStore (new
URI("gsiftp://server:2811/path/to/the/parent/directory/") )
find in fs.childStores your desired file, call it fsfile
fsfile.get(Input|Output)Stream();
--
Best regards
Mateusz Pabis