mirror of
https://github.com/zoriya/flood.git
synced 2025-12-05 23:06:20 +00:00
15 lines
353 B
TypeScript
15 lines
353 B
TypeScript
import fs from 'node:fs';
|
|
import path from 'node: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));
|
|
};
|