
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
Manage your files and directories quickly and easily.
When doing
write,copy,moveif the directory does not exist it will be created automatically.
import youfile from 'youfile'
const youfile = require('youfile')
Write.file(path, data, options?): Promise<void>Write a file asynchronously.
path: string - File path.data: any - File contents.options?: { encoding } - File options.
encoding?: string - File encoding.Write.dir(path, options?): Promise<void>Write a directory asynchronously.
path: string - Directory path.options?: { recursive } - Directory options.
recursive?: boolean - Create all parent directories if they don't exist.Write.json(path, data, options?): Promise<void>Write a json file with objects asynchronously.
path: string - File path.data: object - File contents.options?: { spaces } - File options.
spaces?: number - Number of formatting spaces in the json file, default is 0.Read.file(path, options?): Promise<Buffer | string>Returns the contents of the file asynchronously.
path: string - File path.options?: { encoding } - File options.
encoding?: string - File encoding.Read.json(path, options?): Promise<object>Returns the contents of the file json format as a object asynchronously.
path: string - File path.options?: { comments } - File options.
comments?: boolean - Read the json file if it has comments.Search.files(path, options?): Promise<string[]>Return all paths of files in a directory asynchronously.
path: string - Directory path.options?: { recursive, extname } - Directory options.
recursive?: boolean - Read all internal directoriesextname?: string | string[] - File extension to search.Search.dirs(path, options?): Promise<string[]>Return all paths of folders in a directory asynchronously.
path: string - Directory path.options?: { recursive } - Directory options.
recursive?: boolean - Read all internal directoriesSha256.byFile(path): Promise<string>Calculates the SHA-256 hash of a file asynchronously.
path: string - The file path.Sha256.byString(string): Promise<string>Calculates the SHA-256 hash of a string asynchronously.
string: string - The string.WriteSync.file(path, data, options?): voidWrite a file synchronously.
path: string - File path.data: any - File contents.options?: { encoding } - File options.
encoding?: string - File encoding.WriteSync.dir(path, options?): voidWrite a directory synchronously.
path: string - Directory path.options?: { recursive } - Directory options.
recursive?: boolean - Create all parent directories if they don't exist.WriteSync.json(path, data, options?): voidWrite a json file with objects synchronously.
path: string - File path.data: object - File contents.options?: { spaces } - File options.
spaces?: number - Number of formatting spaces in the json file, default is 0.ReadSync.file(path, options?): Buffer | stringReturns the contents of the file synchronously.
path: string - File path.options?: { encoding } - File options.
encoding?: string - File encoding.ReadSync.json(path, options?): objectReturns the contents of the file json format as a object synchronously.
path: string - File path.options?: { comments } - File options.
comments?: boolean - Read the json file if it has comments.SearchSync.files(path, options?): string[]Return all paths of files in a directory synchronously.
path: string - Directory path.options?: { recursive, extname } - Directory options.
recursive?: boolean - Read all internal directoriesextname?: string | string[] - File extension to search.SearchSync.dirs(path, options?): string[]Return all paths of folders in a directory synchronously.
path: string - Directory path.options?: { recursive } - Directory options.
recursive?: boolean - Read all internal directoriesSha256Sync.byFile(path): stringCalculates the SHA-256 hash of a file synchronously.
path: string - The file path.Sha256Sync.byString(string): stringCalculates the SHA-256 hash of a string synchronously.
string: string - The string.FAQs
Manage your files and directories quickly and easily
We found that youfile demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.