summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasper Beyer <caspervonb@pm.me>2020-09-24 02:09:09 +0800
committerGitHub <noreply@github.com>2020-09-23 14:09:09 -0400
commit3ac9f1e209c3bb10cbb3c0a49077877a5bc5e2eb (patch)
treec2eb0f46a2049e68e60e5de48f7a9dacb1093fe6
parent1021dad5f61d4328f02786f02687aecdab11bcfc (diff)
fix(std/fs): mark createWalkEntry(Sync) as internal (#7643)
-rw-r--r--std/fs/expand_glob.ts12
-rw-r--r--std/fs/walk.ts8
2 files changed, 10 insertions, 10 deletions
diff --git a/std/fs/expand_glob.ts b/std/fs/expand_glob.ts
index 267d7a8c0..c57ddef45 100644
--- a/std/fs/expand_glob.ts
+++ b/std/fs/expand_glob.ts
@@ -10,8 +10,8 @@ import {
} from "../path/mod.ts";
import {
WalkEntry,
- createWalkEntry,
- createWalkEntrySync,
+ _createWalkEntry,
+ _createWalkEntrySync,
walk,
walkSync,
} from "./walk.ts";
@@ -104,7 +104,7 @@ export async function* expandGlob(
let fixedRootInfo: WalkEntry;
try {
- fixedRootInfo = await createWalkEntry(fixedRoot);
+ fixedRootInfo = await _createWalkEntry(fixedRoot);
} catch (error) {
return throwUnlessNotFound(error);
}
@@ -119,7 +119,7 @@ export async function* expandGlob(
const parentPath = joinGlobs([walkInfo.path, ".."], globOptions);
try {
if (shouldInclude(parentPath)) {
- return yield await createWalkEntry(parentPath);
+ return yield await _createWalkEntry(parentPath);
}
} catch (error) {
throwUnlessNotFound(error);
@@ -211,7 +211,7 @@ export function* expandGlobSync(
let fixedRootInfo: WalkEntry;
try {
- fixedRootInfo = createWalkEntrySync(fixedRoot);
+ fixedRootInfo = _createWalkEntrySync(fixedRoot);
} catch (error) {
return throwUnlessNotFound(error);
}
@@ -226,7 +226,7 @@ export function* expandGlobSync(
const parentPath = joinGlobs([walkInfo.path, ".."], globOptions);
try {
if (shouldInclude(parentPath)) {
- return yield createWalkEntrySync(parentPath);
+ return yield _createWalkEntrySync(parentPath);
}
} catch (error) {
throwUnlessNotFound(error);
diff --git a/std/fs/walk.ts b/std/fs/walk.ts
index 06d889b0e..4ae85ff75 100644
--- a/std/fs/walk.ts
+++ b/std/fs/walk.ts
@@ -4,7 +4,7 @@
import { assert } from "../_util/assert.ts";
import { basename, join, normalize } from "../path/mod.ts";
-export function createWalkEntrySync(path: string): WalkEntry {
+export function _createWalkEntrySync(path: string): WalkEntry {
path = normalize(path);
const name = basename(path);
const info = Deno.statSync(path);
@@ -17,7 +17,7 @@ export function createWalkEntrySync(path: string): WalkEntry {
};
}
-export async function createWalkEntry(path: string): Promise<WalkEntry> {
+export async function _createWalkEntry(path: string): Promise<WalkEntry> {
path = normalize(path);
const name = basename(path);
const info = await Deno.stat(path);
@@ -98,7 +98,7 @@ export async function* walk(
return;
}
if (includeDirs && include(root, exts, match, skip)) {
- yield await createWalkEntry(root);
+ yield await _createWalkEntry(root);
}
if (maxDepth < 1 || !include(root, undefined, undefined, skip)) {
return;
@@ -151,7 +151,7 @@ export function* walkSync(
return;
}
if (includeDirs && include(root, exts, match, skip)) {
- yield createWalkEntrySync(root);
+ yield _createWalkEntrySync(root);
}
if (maxDepth < 1 || !include(root, undefined, undefined, skip)) {
return;