/// /// /// import { Readable, Writable } from 'stream'; import { DataSource } from '../data-source.js'; /** * Provides a data source implementation for accessing * data stored on S3. */ export declare class S3DataSource implements DataSource { private url; /** * The descriptor containing the information * about the S3 object. */ private descriptor; /** * S3 data source constructor. * @param url the URL of the data source. */ constructor(url: URL); /** * @returns a readable stream to the data source. */ asReadStream(): Promise; /** * @returns a writable stream to the data source. */ asWriteStream(obj?: any): Writable; /** * @returns an array like buffer of the data source. * @note this method will buffer the entire content of * the data in memory. */ asArrayBuffer(): Promise; /** * @returns the content of the data pointed by the data * source as a buffer. * @note this method will buffer the entire content of * the data in memory. */ asBuffer(): Promise; /** * @returns a promise resolved when the content of * the data source has been written to the specified * file. The promise resolves the path of the * output file. * @param filePath the path to write the file to. * @note the file path must be absolute. */ asFile(filePath?: string): Promise; }