import type { DispatchFn } from '../../runtime/types.ts'; import type { PathSpec } from '../../types.ts'; import type { Session } from '../session/session.ts'; /** * Write a file, giving it the umask's mode if the write created it. * * Every shell path that opens a file for writing goes through here, so * `echo x > f` and `exec > f` agree about the mode a fresh file gets: * 0666 masked by the session's umask, which is what `open(2)` with * `O_CREAT` does. Living in one place is the point; the two callers had * drifted while it was private to one of them. * * The existence probe runs only under a non-default umask, because that * is the one case the answer changes anything: a fresh file already * renders as 644, which is 0666 under bash's default mask. A mode that * cannot be written is swallowed and not fatal, since the bytes are * already there and the write is what the caller asked for. */ export declare function createFile(dispatch: DispatchFn, session: Session, scope: PathSpec, data: Uint8Array): Promise; //# sourceMappingURL=create.d.ts.map