Closed Nicoretti closed 5 months ago
in the bucket we used upload and download instead of write and read
https://github.com/exasol/bucketfs-python/blob/a53a7966e335274f91b7994e1d3e4c034fcefd55/exasol/bucketfs/__init__.py#L242 https://github.com/exasol/bucketfs-python/blob/a53a7966e335274f91b7994e1d3e4c034fcefd55/exasol/bucketfs/__init__.py#L278
But, we also need a way to get the path of the bucket in the UDF File system for the transformer-extension..
Summary
Write an API specification for a "DirectoryBucket" (type name to be defined) for the
bucketfs
library. TheDirectoryBucket
acts as a wrapper around aBucket
, targeted at a specific subdirectory, to facilitate object storage operations within that subdirectory context.Goals
Functionality
read(path: string)
: Read the contents of a file located atpath
within the subdirectory.write(path: string, content: any)
: Writecontent
to a file located atpath
within the subdirectory.delete(path: string)
: Delete a file or directory located atpath
within the subdirectory.files()
: List all files in the current subdirectory.directories()
: List all direct subdirectories asDirectoryBucket
instances.join_path(*paths: string[])
: Safely join multiple path segments, ensuring proper navigation within the subdirectory.Note: Consider having the path operations in a path object which will/can be used by the
DirectoryBucket
.Related Issues