StaticexistsCheck if a file or directory exists
StaticisCheck if a path is readable
StaticisCheck if a path is writable
StaticgetStaticensureEnsure directory exists, creating it if necessary
StaticreadSafely read a file with encoding detection
StaticwriteStaticcopyCopy a file with options
StaticmoveMove a file with options
StaticdeleteDelete a file safely
StaticlistList files in a directory with filtering
StaticfindFind markdown files in a directory
StaticcreateCreate a backup of a file
StaticgetGet file size in bytes
StaticfilesCheck if two files have the same content
StaticsanitizeGenerate a safe filename by removing invalid characters
StaticgetGet relative path between two files
Utility class for common file system operations.
Provides a comprehensive set of static methods for file and directory manipulation, with proper error handling and cross-platform compatibility. All methods are async and use Node.js promises-based file system APIs.
Example
Basic file operations