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

feat(fs): support FileInfo.dev on Windows #18073

Merged
merged 9 commits into from Mar 16, 2023

Conversation

bartlomieju
Copy link
Member

This commit adds support for retrieving dev information
when stating files on Windows.

Additionally Deno.FileInfo interfaces was changed to always
return 0 for fields that we don't retrieve information for on Windows.

Closes #18053

ext/fs/30_fs.js Show resolved Hide resolved
ext/fs/lib.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@aapoalas aapoalas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lstating a dangling file seems to be failing on Windows. Presumably that's still related to these changes?

@bartlomieju bartlomieju changed the title [WIP] feat(fs): support FileInfo.dev on Windows feat(fs): support FileInfo.dev on Windows Mar 15, 2023
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bartlomieju bartlomieju merged commit 48a0b7f into denoland:main Mar 16, 2023
9 checks passed
@bartlomieju bartlomieju deleted the windows_stat_dev branch March 16, 2023 01:35
@lucacasonato
Copy link
Member

lucacasonato commented Mar 16, 2023

Yay! Can we revert the part of this change that sets everything to 0 for windows? The null->zero should happen in ext/node. Also this is a breaking API change.

bartlomieju added a commit that referenced this pull request Mar 16, 2023
Addresses feedback from
#18073 (comment).

Reverts changes to `FileInfo` fields that are not available on Windows
making them `null`. Only `FileInfo.dev` is non-null.
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

Successfully merging this pull request may close these issues.

Implement mode field of Deno.FileInfo on Windows
4 participants