Skip to content

Base.read method partially supported #280

@etibarg

Description

@etibarg

Hi,

Following logic from #279, in order to add "transparency" in the use of S3Path, I ended up coding the following:

using AWSS3: S3Path
function Base.read(fp::S3Path, nb::Integer)
    read(fp; byte_range=1:nb)
end

... in order to match:

Base.read(s::IOStream, nb::Integer; all=true)

(in a simplified version)

Granted, the Base version takes an IOStream. But considering the existing read(fp::S3Path; byte_range=1:nb) method provided, the expected behavior is not far-fecthed.
This is very convient in order not to download the whole file (e.g. to access some metadata), while not caring of the actual path type.

Would it be possible to implement it?

Rgds,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions