1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 23:34:47 -05:00

docs(std/fs): remove stale references to readFileStr and writeFileStr (#7254)

This commit is contained in:
Casper Beyer 2020-08-30 07:19:31 +08:00 committed by GitHub
parent e27fb30117
commit 62809cd605
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -174,37 +174,6 @@ async function printFilesNames() {
printFilesNames().then(() => console.log("Done!"));
```
### readFileStr
Read file and output it as a string. Note: this module does not require the
`--unstable` flag.
**ReadOptions**
- encoding : The encoding to read file. lowercased.
```ts
import { readFileStr, readFileStrSync } from "https://deno.land/std/fs/mod.ts";
readFileStr("./target.dat", { encoding: "utf8" }); // returns a promise
readFileStrSync("./target.dat", { encoding: "utf8" }); // string
```
### writeFileStr
Write the string to file. Note: this module does not require the `--unstable`
flag.
```ts
import {
writeFileStr,
writeFileStrSync,
} from "https://deno.land/std/fs/mod.ts";
writeFileStr("./target.dat", "file content"); // returns a promise
writeFileStrSync("./target.dat", "file content"); // void
```
### expandGlob
Expand the glob string from the specified `root` directory and yield each result