fix(fs): Fix issues with fs file copy functions.

This commit is contained in:
2025-01-29 12:21:49 +01:00
parent 1657d0e1c6
commit de2a250a45
5 changed files with 1734 additions and 3040 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartfile',
version: '11.1.5',
version: '11.1.6',
description: 'Provides comprehensive tools for efficient file management in Node.js using TypeScript, including handling streams, virtual directories, and various file operations.'
}

View File

@ -72,7 +72,7 @@ export const isFile = (pathArg): boolean => {
===============================================================*/
/**
* copies a file from A to B on the local disk
* copies a file or directory from A to B on the local disk
*/
export const copy = async (fromArg: string, toArg: string): Promise<boolean> => {
const done = plugins.smartpromise.defer<boolean>();
@ -86,7 +86,7 @@ export const copy = async (fromArg: string, toArg: string): Promise<boolean> =>
};
/**
* copies a file SYNCHRONOUSLY from A to B on the local disk
* copies a file or directory SYNCHRONOUSLY from A to B on the local disk
*/
export const copySync = (fromArg: string, toArg: string): boolean => {
plugins.fsExtra.copySync(fromArg, toArg);