mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 20:59:10 +00:00
BREAKING(std/fs): remove readFileStr and readFileStrSync (#6848)
This removes the readFileStr and readFileStrSync functions which are effectively duplicates of Deno.readTextFile and Deno.readTextFileSync.
This commit is contained in:
parent
843b54549c
commit
fd900cfe21
4 changed files with 1 additions and 70 deletions
|
@ -1,7 +1,6 @@
|
|||
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
||||
import { assertEquals } from "../testing/asserts.ts";
|
||||
import { existsSync } from "../fs/exists.ts";
|
||||
import { readFileStrSync } from "../fs/read_file_str.ts";
|
||||
import * as path from "../path/mod.ts";
|
||||
import { parse, stringify } from "./toml.ts";
|
||||
|
||||
|
@ -11,8 +10,7 @@ function parseFile(filePath: string): object {
|
|||
if (!existsSync(filePath)) {
|
||||
throw new Error(`File not found: ${filePath}`);
|
||||
}
|
||||
const strFile = readFileStrSync(filePath);
|
||||
return parse(strFile);
|
||||
return parse(Deno.readTextFileSync(filePath));
|
||||
}
|
||||
|
||||
Deno.test({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue