Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deno.stat and Deno.lstat return FileInfo with null name and path properties #2308

Closed
arcatdmz opened this issue May 8, 2019 · 2 comments
Closed

Comments

@arcatdmz
Copy link
Contributor

arcatdmz commented May 8, 2019

Is this an intended behavior? I expected these properties to be filled with the actual file name and path.

$ deno run --allow-read http://danoweb.site/stat_test.ts test.txt
Downloading http://danoweb.site/stat_test.ts
Compiling http://danoweb.site/stat_test.ts
stat null null
lstat null null

stat_test.ts looks like this:

try {
  const stat = Deno.statSync(Deno.args[1]);
  console.log("stat", stat.name, stat.path);
  const lstat = Deno.lstatSync(Deno.args[1]);
  console.log("lstat", lstat.name, lstat.path);
} catch (e) {
  console.error("specified file not found");
}

test code is also available at: https://danoweb.site/stat_test.ts?mode=edit

@bartlomieju
Copy link
Member

Duplicate of #1770

@arcatdmz
Copy link
Contributor Author

arcatdmz commented May 8, 2019

ohhhhh thank you for pointing me to the issue... now I'm closing this one.

@arcatdmz arcatdmz closed this as completed May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants