@nxworker/workspace
Version:
Nx plugin providing generators for managing workspace files, including the move-file generator for safely moving files between projects while updating all imports
15 lines (14 loc) • 661 B
TypeScript
import type { Tree } from '@nx/devkit';
/**
* Cached wrapper for tree.exists() to avoid redundant file system checks.
*
* This function uses a cache to store the results of tree.exists() calls,
* which can significantly reduce file system overhead when checking the same
* files multiple times during a move operation.
*
* @param tree - The virtual file system tree
* @param filePath - Path to check for existence
* @param fileExistenceCache - Cache for file existence checks
* @returns True if file exists, false otherwise
*/
export declare function cachedTreeExists(tree: Tree, filePath: string, fileExistenceCache: Map<string, boolean>): boolean;