EldoS | Feel safer!

Software components for data protection, secure storage and transfer

File Exists

Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.
#4000
Posted: 10/12/2007 15:19:27
by Kobin Bingham (Standard support level)
Joined: 10/02/2006
Posts: 15

Hey all,
What is the easiest way to tell if a file exists on an SFTP site before trying to download it? I've searched the forums and found a little on it, but I'm still rather confused.

Thanks for any help you can give me.
#4001
Posted: 10/13/2007 01:29:25
by Eugene Mayevski (EldoS Corp.)

Request file attributes.


Sincerely yours
Eugene Mayevski
#4002
Posted: 10/13/2007 01:32:12
by Eugene Mayevski (EldoS Corp.)

BTW in ElSimpleSFTPClient there exists FileExists method.


Sincerely yours
Eugene Mayevski
#4015
Posted: 10/15/2007 10:30:02
by Kobin Bingham (Standard support level)
Joined: 10/02/2006
Posts: 15

I'm not seeing the FileExists method. What version does that first show up in? Also, if I request the attributes of a non-existent file, what am I going to get? For that matter, what am I going to get if I request attributes for an existing file? I haven't worked with this a whole lot and I'm not having much luck finding documentation that shows me exactly what to expect.

Thank you much for your help.
#4016
Posted: 10/15/2007 10:45:57
by Eugene Mayevski (EldoS Corp.)

Maybe you are using old version of SecureBlackbox. FileExists is a new addition.

With RequestAttributes you can either get attributes or an exception. An exception will report the error "no such file". This is exactly what FileExists does but it handles the exception internally.


Sincerely yours
Eugene Mayevski
Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.

Reply

Statistics

Topic viewed 2200 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!