mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: MacCloud/S3: step-116: s3BuckPathHelper() for multi-bucket
This commit is contained in:
parent
85445cfa0a
commit
5761433e56
1 changed files with 19 additions and 0 deletions
|
|
@ -193,6 +193,25 @@ implementation
|
|||
var
|
||||
s3CloudDriverConfig: TS3Config;
|
||||
|
||||
procedure s3BuckPathHelper(
|
||||
const authSession: TCloudDriverAuthSession;
|
||||
const path: String;
|
||||
var bucketPath: String;
|
||||
var connectionData: TAWSConnectionData );
|
||||
var
|
||||
parser: TS3PathParser = nil;
|
||||
driver: TS3Client;
|
||||
begin
|
||||
try
|
||||
parser:= TS3PathParser.Create( path );
|
||||
driver:= TS3Client( authSession.cloudDriver );
|
||||
bucketPath:= parser.bucketPath;
|
||||
connectionData:= driver.getConnectionDataOfBucket( parser.bucketName );
|
||||
finally
|
||||
FreeAndNil( parser );
|
||||
end;
|
||||
end;
|
||||
|
||||
// raise the corresponding exception if there are errors
|
||||
procedure S3ClientResultProcess( const cloudDriverResult: TCloudDriverResult );
|
||||
var
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue