Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
axetroy committed Apr 14, 2019
1 parent 57ca59f commit 2a7ebcb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions fs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,17 +161,20 @@ Read file and output it as a string.
```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' }); // void
readFileStr("./target.dat", { encoding: "utf8" }); // returns a promise
readFileStrSync("./target.dat", { encoding: "utf8" }); // void
```

### writeFileStr

Write the string to file.

```ts
import { writeFileStr, writeFileStrSync } from "https://deno.land/std/fs/mod.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
```
```

0 comments on commit 2a7ebcb

Please sign in to comment.