EldoS | Feel safer!

Software components for data protection, secure storage and transfer

How to using: CreateDirectoryPath

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.
#36194
Posted: 03/11/2016 07:35:19
by Piotr Frączek (Standard support level)
Joined: 01/26/2016
Posts: 4

Hi,

how to use method CreateDirectoryPath in SBSimpleSftp.

I want to create full directory list:

/home/user/repo/devel

Directory ../repo/devel not exists.

FSFTPClient.CreateDirectoryPath('/home/user/repo/devel/'); // not working

thanks for reply
#36195
Posted: 03/11/2016 07:40:21
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

Quote
FSFTPClient.CreateDirectoryPath('/home/user/repo/devel/'); // not working


Could you please clarify what do you mean by "not working": do you get any exception or simply directories are not created?
#36199
Posted: 03/11/2016 07:47:24
by Eugene Mayevski (EldoS Corp.)

Quote
Piotr Frączek wrote:
FSFTPClient.CreateDirectoryPath('/home/user/repo/devel/'); // not working


It should be working, though, possibly, without a trailing slash. If something doesn't work, the issue is not with the function (it's used widely in UploadFiles() method), but maybe with permissions or something else, server-specific.


Sincerely yours
Eugene Mayevski
#36202
Posted: 03/11/2016 08:41:39
by Piotr Frączek (Standard support level)
Joined: 01/26/2016
Posts: 4

When I run program I have error:

Quote
raised exception class EElSFTPError with message 'No such file'.


But the same line but in "Debug > Evaluate" work :|

Code
APath := '/home/piotrek/repo/devel/updater_ext';
FSFTPClient.CreateDirectoryPath(APath);


-- EDIT --
Using UploadFile without execute CreateDirectoryPath - the same error
Code
ARemotePath:= '/home/piotrek/repo/devel/updater_ext/updater.exe'
FSFTPClient.UploadFile(ALocalFileName, ARemotePath);
#36207
Posted: 03/11/2016 16:09:05
by Piotr Frączek (Standard support level)
Joined: 01/26/2016
Posts: 4

Hi again,
I checked yours example (SimpleSftpDemo), the error also appears.

Just have to upload the file to a directory that doesn't exist.

Code
Delphi: XE7 Pro
SB Version: SecureBlackbox 13.0.282.0


Screen in attachment.


#36208
Posted: 03/11/2016 16:15:45
by Eugene Mayevski (EldoS Corp.)

Ok, so "it doesn't work" means that you have an exception when running the code in Delphi IDE, is this correct? If yes, please try to run the same code not from the IDE. The internal exception should be ignored. You can add EElSFTPError to the list of ignored errors in Delphi IDE.

On a side note, I’ve noticed there is no Support Access Ticket linked to your user account on EldoS site (you have linked only License Access Ticket). We welcome you to link the Support Access Ticket as well so that our system could indicate you as a person eligible for support. You will find your Support Access Ticket together with all the details about how to use it in the registration e-mail that we’ve sent to you upon the purchase.


Sincerely yours
Eugene Mayevski
#36209
Posted: 03/11/2016 16:26:01
by Piotr Frączek (Standard support level)
Joined: 01/26/2016
Posts: 4

Quote
Ok, so "it doesn't work" means that you have an exception when running the code in Delphi IDE, is this correct? If yes, please try to run the same code not from the IDE.

If run compiled exe error does not appear...

Quote
The internal exception should be ignored. You can add EElSFTPError to the list of ignored errors in Delphi IDE.

I'll try.
#36210
Posted: 03/11/2016 16:31:11
by Eugene Mayevski (EldoS Corp.)

Quote
Piotr Frączek wrote:
If run compiled exe error does not appear...


That's it - I've reviewed the code and there's an internal exception thrown, which we catch in our code and act accordingly.


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 1714 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!