ADD: MacCloud/S3: step-116: s3BuckPathHelper() for multi-bucket

This commit is contained in:
rich2014 2025-05-10 15:23:29 +08:00
commit 5761433e56

View file

@ -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