Skip to content

Commit

Permalink
docs(fs): add missing docs (#6400)
Browse files Browse the repository at this point in the history
  • Loading branch information
kt3k authored Feb 14, 2025
1 parent 50f7c0c commit 4746114
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
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

0 comments on commit 4746114

Please sign in to comment.