import type { Resource } from '../../resource/base.ts'; import type { PathSpec } from '../../types.ts'; import type { MountRegistry } from './registry.ts'; export declare function resourceStorageId(resource: Resource): string; /** * Build the transfer generics' identity function for a mount set. * * `cp` and `mv` compare two operands to decide whether they name the same * file. Within one mount the mount-relative path answers that, but across * mounts it does not: two prefixes can address one store, and there a move * would copy an object over itself and then unlink the source. * * The resource's storage id and the mount-relative path are joined into * one path-like string rather than kept as separate components, so nested * backings collapse onto the same key. Two disk mounts rooted at * `/srv/data` and `/srv/data/sub` make `/a/sub/x` and `/b/x` the same * file, and both render as `disk:/srv/data/sub/x`. A delimiter between * the two parts would keep them apart and let the move through. * * The mount-relative path keeps its leading slash so the generics' * `startsWith(key + '/')` containment test still marks a directory as an * ancestor of its children, and only within one storage. */ export declare function makeStorageKey(registry: MountRegistry): (path: PathSpec) => string; //# sourceMappingURL=storage.d.ts.map