Skip to content
New issue

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

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

Already on GitHub? # to your account

"io/fs/filepath" package: utility functions for filename path #5

Closed
svengreb opened this issue Nov 19, 2020 · 0 comments · Fixed by #6
Closed

"io/fs/filepath" package: utility functions for filename path #5

svengreb opened this issue Nov 19, 2020 · 0 comments · Fixed by #6

Comments

@svengreb
Copy link
Owner

svengreb commented Nov 19, 2020

The standard library provides the path/filepath package that simplifies some common filesystem path handling tasks like glob pattern matching and many more useful functions.

golib will provide a io/fs/filepath package that extends the filepath package with more utilities.
For more advanced and extended features see packages like github.com/spf13/afero instead.
Please note that some functions will interact with the underlying filesystem through on-disk operations!

  • IsSubDir(parentPath, subPath string, evalSymlinks bool) (bool, error) — checks if a path is a subdirectory of another path.
@svengreb svengreb added this to the 0.1.0 milestone Nov 19, 2020
@svengreb svengreb self-assigned this Nov 19, 2020
svengreb added a commit that referenced this issue Nov 19, 2020
The standard library provides the `path/filepath` [1] package that
simplifies some common filesystem path handling tasks like "glob"
pattern matching [2] and many more useful functions.

golib now provides a `io/fs/filepath` package that extends the
`filepath` [1] package with more utilities. For more advanced and
extended features see packages like github.com/spf13/afero [3] instead.
Please note that some functions interact with the underlying filesystem
through on-disk operations!

- IsSubDir(parentPath, subPath string, evalSymlinks bool) (bool, error)
  checks if a path is a subdirectory of another path.

[1]: https://golang.org/pkg/path/filepath
[2]: https://golang.org/pkg/path/filepath/#Glob
[3]: https://github.com/spf13/afero

GH-5
svengreb added a commit that referenced this issue Nov 19, 2020
The standard library provides the `path/filepath` [1] package that
simplifies some common filesystem path handling tasks like "glob"
pattern matching [2] and many more useful functions.

golib now provides a `io/fs/filepath` package that extends the
`filepath` [1] package with more utilities. For more advanced and
extended features see packages like github.com/spf13/afero [3] instead.
Please note that some functions interact with the underlying filesystem
through on-disk operations!

- IsSubDir(parentPath, subPath string, evalSymlinks bool) (bool, error)
  checks if a path is a subdirectory of another path.

[1]: https://golang.org/pkg/path/filepath
[2]: https://golang.org/pkg/path/filepath/#Glob
[3]: https://github.com/spf13/afero

Closes GH-5
@svengreb svengreb removed their assignment Nov 19, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant