Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(fs): add missing docs #6400

Merged
merged 1 commit into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions _tools/check_docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,17 @@ const ENTRY_POINTS = [
"../front_matter/mod.ts",
"../front_matter/unstable_yaml.ts",
"../fs/mod.ts",
"../fs/unstable_chmod.ts",
"../fs/unstable_link.ts",
"../fs/unstable_lstat.ts",
"../fs/unstable_make_temp_dir.ts",
"../fs/unstable_read_dir.ts",
"../fs/unstable_read_file.ts",
"../fs/unstable_read_link.ts",
"../fs/unstable_real_path.ts",
"../fs/unstable_rename.ts",
"../fs/unstable_stat.ts",
"../fs/unstable_symlink.ts",
"../fs/unstable_types.ts",
"../html/mod.ts",
"../html/unstable_is_valid_custom_element_name.ts",
Expand Down
5 changes: 4 additions & 1 deletion fs/unstable_read_dir.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { DirEntry } from "./unstable_types.ts";
* {@linkcode DirEntry}. The order of entries is not guaranteed.
*
* @example Usage
* ```ts
* ```ts no-assert
* import { readDir } from "@std/fs/unstable-read-dir";
*
* for await (const dirEntry of readDir("/")) {
Expand All @@ -23,6 +23,9 @@ import type { DirEntry } from "./unstable_types.ts";
*
* @tags allow-read
* @category File System
*
* @param path The path to the directory to read.
* @returns An async iterable of {@linkcode DirEntry}.
*/
export async function* readDir(path: string | URL): AsyncIterable<DirEntry> {
if (isDeno) {
Expand Down
4 changes: 2 additions & 2 deletions fs/unstable_read_file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { mapError } from "./_map_error.ts";
* Requires `allow-read` permission.
*
* @example Usage
* ```ts
* ```ts no-assert
* import { readFile } from "@std/fs/unstable-read-file";
* const decoder = new TextDecoder("utf-8");
* const data = await readFile("README.md");
Expand Down Expand Up @@ -49,7 +49,7 @@ export async function readFile(
* Requires `allow-read` permission.
*
* @example Usage
* ```ts
* ```ts no-assert
* import { readFileSync } from "@std/fs/unstable-read-file";
* const decoder = new TextDecoder("utf-8");
* const data = readFileSync("README.md");
Expand Down
2 changes: 2 additions & 0 deletions fs/unstable_symlink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import type { SymlinkOptions } from "./unstable_types.ts";
*
* @param oldpath The path of the resource pointed by the symbolic link.
* @param newpath The path of the symbolic link.
* @param options Options when creating a symbolic link.
*/
export async function symlink(
oldpath: string | URL,
Expand Down Expand Up @@ -61,6 +62,7 @@ export async function symlink(
*
* @param oldpath The path of the resource pointed by the symbolic link.
* @param newpath The path of the symbolic link.
* @param options Options when creating a symbolic link.
*/
export function symlinkSync(
oldpath: string | URL,
Expand Down
Loading