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

vscode.workspace.fs.stat(): wrong creation time. #84525

Closed
ericsnowcurrently opened this issue Nov 11, 2019 · 5 comments
Closed

vscode.workspace.fs.stat(): wrong creation time. #84525

ericsnowcurrently opened this issue Nov 11, 2019 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug file-io File I/O verified Verification succeeded
Milestone

Comments

@ericsnowcurrently
Copy link
Member

VSCode Version: 1.40.0
OS: linux
(working on an extension remotely over SSH; haven't tried local)

When calling vscode.workspace.fs.stat(), the resulting FileStat.ctime is consistently 0 rather than the correct creation time.

@jrieken

@bpasero
Copy link
Member

bpasero commented Nov 12, 2019

Coming from:

@jrieken jrieken added the file-io File I/O label Nov 12, 2019
@jrieken
Copy link
Member

jrieken commented Nov 12, 2019

@bpasero That's because the internal API drops this information, e.g there is no ctime on IBaseStat. Are you adding this or should I?

@jrieken jrieken added the bug Issue identified by VS Code Team member as probable bug label Nov 12, 2019
@bpasero bpasero added this to the November 2019 milestone Nov 12, 2019
@bpasero
Copy link
Member

bpasero commented Nov 12, 2019

Hm, not sure why it was never there, I can add it.

@bpasero
Copy link
Member

bpasero commented Nov 12, 2019

I pushed a change to use fs.stat().birthtime for ctime. We are a bit diverging from the posix spec that says ctime is "last changed time". But I leave that decision up to @jrieken if we maybe need to be more specific.

@ericsnowcurrently
Copy link
Member Author

Thanks @bpasero and @jrieken!

@roblourens roblourens added the verified Verification succeeded label Dec 4, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug file-io File I/O verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants