Urara-Blog/node_modules/.pnpm-store/v3/files/95/6157f25b5a39c5c7d074b67e843d47fca2f245a879f6e0f483d74247d29a6260e9a2efae89a9c75051109dba1931bc4e3b194f772c651dc41241b29f3fde19
2022-08-14 01:14:53 +08:00

16 lines
No EOL
539 B
Text

import * as fs from 'graceful-fs';
import { dirname } from 'path';
import mkdirp from 'mkdirp';
import resolvePathAndOptions from '../utils/resolvePathAndOptions';
export function createReadStream () {
const { resolvedPath, options } = resolvePathAndOptions( arguments );
return fs.createReadStream( resolvedPath, options );
}
export function createWriteStream () {
const { resolvedPath, options } = resolvePathAndOptions( arguments );
mkdirp.sync( dirname( resolvedPath ) );
return fs.createWriteStream( resolvedPath, options );
}