UNPKG

614 BTypeScriptView Raw
1/**
2 * @file for file processing
3 */
4/// <reference types="node" />
5/**
6 * create unique name file
7 *
8 * @param {string} template template string for file name
9 * @param {Function} [callback]
10 * @return {Promise}
11 */
12export declare function createFile(template: string, callback?: (err: NodeJS.ErrnoException | null, filename: string | null) => void): undefined | Promise<string | null>;
13/**
14 * sync version createFile
15 *
16 * @param {string} template template string for file name
17 * @throws {Error} if caught error
18 * @return {string} filename
19 */
20export declare function createFileSync(template: string): string;