import * as mod from "https://deno.land/std@0.224.0/fs/mod.ts";
Helpers for working with the filesystem.
import { ensureFile, copy, ensureDir, move } from "https://deno.land/std@0.224.0/fs/mod.ts";
await ensureFile("example.txt");
await copy("example.txt", "example_copy.txt");
await ensureDir("subdir");
await move("example_copy.txt", "subdir/example_copy.txt");
Classes
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> |
Variables
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> v CRLF | End-of-line character for Windows platforms. |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> v EOL | End-of-line character evaluated for the current platform. |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> v LF | End-of-line character for POSIX platforms such as macOS and Linux. |
Functions
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> f copy | Asynchronously copy a file or directory. The directory can have contents.
Like |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Synchronously copy a file or directory. The directory can have contents.
Like |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Returns the detected EOL character(s) detected in the input string. If no EOL
character is detected, |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Asynchronously ensures that a directory is empty deletes the directory contents it is not empty. If the directory does not exist, it is created. The directory itself is not deleted. |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Synchronously ensures that a directory is empty deletes the directory contents it is not empty. If the directory does not exist, it is created. The directory itself is not deleted. |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Asynchronously ensures that the directory exists. If the directory structure
does not exist, it is created. Like |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Synchronously ensures that the directory exists. If the directory structure
does not exist, it is created. Like |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Asynchronously ensures that the file exists. If the file that is requested to be created is in directories that do not exist, these directories are created. If the file already exists, it is not modified. |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Synchronously ensures that the file exists. If the file that is requested to be created is in directories that do not exist, these directories are created. If the file already exists, it is not modified. |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Asynchronously ensures that the hard link exists. If the directory structure does not exist, it is created. |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Synchronously ensures that the hard link exists. If the directory structure does not exist, it is created. |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Asynchronously ensures that the link exists, and points to a valid file. If the directory structure does not exist, it is created. If the link already exists, it is not modified but error is thrown if it is not point to the given target. |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Synchronously ensures that the link exists, and points to a valid file. If the directory structure does not exist, it is created. If the link already exists, it is not modified but error is thrown if it is not point to the given target. |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Asynchronously test whether or not the given path exists by checking with the file system. |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Synchronously test whether or not the given path exists by checking with the file system. |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Returns an async iterator that yields each file path matching the given glob
pattern. The file paths are relative to the provided |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Returns an iterator that yields each file path matching the given glob
pattern. The file paths are relative to the provided |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Normalize the input string to the targeted EOL. |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> f move | Asynchronously moves a file or directory. |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Synchronously moves a file or directory. |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> f walk | Recursively walks through a directory and yields information about each file and directory encountered. |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Same as |
Interfaces
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Options for |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Options for |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Options for |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> | Walk entry for |
*]:space-x-2 [&>*]:min-w-[13rem] [&>*]:flex [&>*]:items-center"> |