mirror of
https://github.com/zoriya/flood.git
synced 2026-08-15 18:53:27 +00:00
15 lines
343 B
TypeScript
15 lines
343 B
TypeScript
import fs from 'fs';
|
|
import path from 'path';
|
|
|
|
import config from '../../config';
|
|
|
|
fs.mkdirSync(config.tempPath, {recursive: true});
|
|
|
|
export const getTempPath = (filename: string): string => {
|
|
return path.join(config.tempPath, filename);
|
|
};
|
|
|
|
export const deleteFile = (filename: string): void => {
|
|
fs.unlinkSync(getTempPath(filename));
|
|
};
|