import type { SharePointAccessor } from '../../accessor/sharepoint.ts'; import type { IndexCacheStore } from '../../cache/index/store.ts'; import type { FindOptions } from '../../resource/base.ts'; import { FileStat, type PathSpec } from '../../types.ts'; /** * Read a file, optionally only a byte range of it. * * Args: * accessor: SharePoint accessor. * path: the path to read. * _index: unused; Graph resolves the item from the path itself. * options: `{offset, size}`, the byte window, or absent for the whole file. */ export declare function read(accessor: SharePointAccessor, path: PathSpec, _index?: IndexCacheStore, options?: { offset?: number; size?: number; }): Promise; export declare function stream(accessor: SharePointAccessor, path: PathSpec, _index?: IndexCacheStore): AsyncIterable; export declare function readdir(accessor: SharePointAccessor, path: PathSpec, index?: IndexCacheStore): Promise; export declare function stat(accessor: SharePointAccessor, path: PathSpec, index?: IndexCacheStore): Promise; export declare function write(accessor: SharePointAccessor, path: PathSpec, data: Uint8Array): Promise; export declare function create(accessor: SharePointAccessor, path: PathSpec): Promise; export declare function mkdir(accessor: SharePointAccessor, path: PathSpec, parents?: boolean): Promise; export declare function unlink(accessor: SharePointAccessor, path: PathSpec): Promise; export declare function rmR(accessor: SharePointAccessor, path: PathSpec): Promise; /** * Remove an empty folder. * * A Graph `DELETE /drives/{id}/items/{item}` removes a folder and * everything under it, so this is the same request `rmR` sends and the * emptiness check is the only thing separating them. Aliasing the two -- * which this was -- destroyed the whole subtree for every caller that does * not pre-check emptiness itself, and the command builders are the only * callers that do: FUSE, `ws.fs` and the sandbox runtimes all reach the op * directly. */ export declare function rmdir(accessor: SharePointAccessor, path: PathSpec): Promise; export declare const exists: (accessor: SharePointAccessor, path: PathSpec) => Promise; export declare function rename(accessor: SharePointAccessor, src: PathSpec, dst: PathSpec): Promise; export declare function copy(accessor: SharePointAccessor, src: PathSpec, dst: PathSpec): Promise; export declare const truncate: (accessor: SharePointAccessor, path: PathSpec, length: number) => Promise; export declare function du(accessor: SharePointAccessor, path: PathSpec, index?: IndexCacheStore): Promise; export declare function duEntries(accessor: SharePointAccessor, path: PathSpec, index?: IndexCacheStore): Promise<[[string, number][], number]>; export declare function find(accessor: SharePointAccessor, path: PathSpec, options?: FindOptions): Promise; //# sourceMappingURL=index.d.ts.map