0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-29 08:58:01 -04:00

lStat -> lstat

This commit is contained in:
Ryan Dahl 2018-09-04 15:28:18 -04:00
parent 641e3d404d
commit d6c310596e
3 changed files with 8 additions and 8 deletions

View file

@ -10,7 +10,7 @@ export {
readFileSync,
renameSync,
statSync,
lStatSync,
lstatSync,
writeFileSync
} from "./os";
export { libdeno } from "./libdeno";

View file

@ -277,7 +277,7 @@ export class FileInfo {
* be returned.
* @returns FileInfo
*/
export function lStatSync(filename: string): FileInfo {
export function lstatSync(filename: string): FileInfo {
return statSyncInner(filename, true);
}

View file

@ -56,26 +56,26 @@ test(async function statSyncNotFound() {
assertEqual(badInfo, undefined);
});
test(async function lStatSyncSuccess() {
const packageInfo = deno.lStatSync("package.json");
test(async function lstatSyncSuccess() {
const packageInfo = deno.lstatSync("package.json");
assert(packageInfo.isFile());
assert(!packageInfo.isSymlink());
const testingInfo = deno.lStatSync("testing");
const testingInfo = deno.lstatSync("testing");
assert(!testingInfo.isDirectory());
assert(testingInfo.isSymlink());
const srcInfo = deno.lStatSync("src");
const srcInfo = deno.lstatSync("src");
assert(srcInfo.isDirectory());
assert(!srcInfo.isSymlink());
});
test(async function lStatSyncNotFound() {
test(async function lstatSyncNotFound() {
let caughtError = false;
let badInfo;
try {
badInfo = deno.lStatSync("bad_file_name");
badInfo = deno.lstatSync("bad_file_name");
} catch (err) {
caughtError = true;
// TODO assert(err instanceof deno.NotFound).