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

Implement path:stat #1688

Closed
wants to merge 1 commit into from
Closed

Implement path:stat #1688

wants to merge 1 commit into from

Conversation

krader1961
Copy link
Contributor

In theory the path:stat command introduced by this change allows an Elvish implementation of something like the Unix ls, or Windows dir, command. More importantly, it provides a more general API than builtins like path:is-dir and path:is-regular. Making it possible to test many other path attributes. I didn't deprecate those related commands because they are probably used often enough it doesn't make sense to deprecate them.

Related: #1659

In theory the `path:stat` command introduced by this change allows an
Elvish implementation of something like the Unix `ls`, or Windows `dir`,
command. More importantly, it provides a more general API than builtins
like `path:is-dir` and `path:is-regular`. Making it possible to test many
other path attributes. I didn't deprecate those related commands because
they are probably used often enough it doesn't make sense to deprecate them.

Related: elves#1659
@krader1961
Copy link
Contributor Author

I should also mention that my original motivation for this command was to make it easier to unit test related commands such as the path:chmod I have in my pipeline of path module changes to resolve #1659.

@krader1961
Copy link
Contributor Author

Closing until the os module is introduced after which I will reinstate this change.

@krader1961 krader1961 closed this Apr 17, 2023
@krader1961 krader1961 deleted the path-stat branch October 27, 2023 04:20
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.

None yet

1 participant