import 'reflect-metadata'; import { CopyOptionsSync } from 'fs-extra'; export declare namespace UtilsFilesFoldersSync { const IGNORE_FOLDERS_FILES_PATTERNS: string[]; const readFile: (absoluteFilePath: string | string[], // @ts-ignore options?: { defaultValueWhenNotExists?: string | undefined; notTrim?: boolean; /** * Default false */ readImagesWithoutEncodingUtf8?: boolean; /** * Default false */ forceReadWithoutEncodingUtf8?: boolean; }) => string | undefined; const writeFile: (absoluteFilePath: string | string[], input: string | object | Buffer, options?: { /** * Default false * by default it will not write the file if the content is exactly the same */ overrideSameFile?: boolean; preventParentFile?: boolean; /** * Default false */ writeImagesWithoutEncodingUtf8?: boolean; /** * Default false */ forceReadWithoutEncodingUtf8?: boolean; }) => boolean; interface UtilsFilesFoldersSyncGetFilesFromOptions { recursive?: boolean; followSymlinks?: boolean; /** * glob patterns to omit from result */ omitPatterns?: string[]; } /** * return absolute paths for files inside folder or link to folder */ const getFilesFrom: (folderOrLinkToFolder: string | string[], options?: UtilsFilesFoldersSyncGetFilesFromOptions) => string[]; /** * return absolute paths for folders inside folder or link to folder */ const getFoldersFrom: (folderOrLinkToFolder: string | string[], options?: UtilsFilesFoldersSyncGetFilesFromOptions) => string[]; const copy: (sourceDir: string | string[], destinationDir: string | string[], options?: { filter?: any; overwrite?: boolean; recursive?: boolean; asSeparatedFiles?: boolean; asSeparatedFilesAllowNotCopied?: boolean; asSeparatedFilesSymlinkAsFile?: boolean; /** * folders to omit: example: ['src','node_modules'] * * This option works only with omitFoldersBaseFolder */ omitFolders?: string[]; /** * absolute path for base folder for omitFolder option */ omitFoldersBaseFolder?: string; copySymlinksAsFiles?: boolean; copySymlinksAsFilesDeleteUnexistedLinksFromSourceFirst?: boolean; useTempFolder?: boolean; dontAskOnError?: boolean; } & CopyOptionsSync) => void; const filterDontCopy: (basePathFoldersTosSkip: string[], projectOrBasepath: string) => (src: string, dest: string) => boolean; const filterOnlyCopy: (basePathFoldersOnlyToInclude: string[], projectOrBasepath: string) => (src: string, dest: string) => boolean; const copyFile: (sourcePath: string | string[], destinationPath: string | string[], options?: { transformTextFn?: (input: string) => string; debugMode?: boolean; fast?: boolean; dontCopySameContent?: boolean; }) => boolean; /** * @deprecated use .copy and then .remove on * source folder.. * * This method is messing with parcel watcher * (moved files are not detected) */ const move: (from: string, to: string, options?: { purpose?: string; }) => void; } /** * TODO @LAST @IN_PROGRESS * - utils for files and folders operations * - export when ready * - should be ready for everything async refactor */ export declare namespace UtilsFilesFolders { /** * Patterns that should be always ignored */ const IGNORE_FOLDERS_FILES_PATTERNS: string[]; }