mirror of
https://github.com/gabehf/Tdarr_Plugins.git
synced 2026-03-16 18:45:53 -07:00
Use fsp for promises
This commit is contained in:
parent
a5714ebf34
commit
e08aa2356d
10 changed files with 27 additions and 26 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { promises as fs } from 'fs';
|
||||
import { promises as fsp } from 'fs';
|
||||
import { IpluginInputArgs } from './interfaces/interfaces';
|
||||
|
||||
export const getContainer = (filePath: string): string => {
|
||||
|
|
@ -37,7 +37,7 @@ export const getSubStem = ({
|
|||
};
|
||||
|
||||
export const getFileSize = async (file:string):Promise<number> => {
|
||||
const stats = await fs.stat(file);
|
||||
const stats = await fsp.stat(file);
|
||||
const { size } = stats;
|
||||
return size;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue