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

Operations exists() and length() on Path #214

Closed
StefanOltmann opened this issue Aug 22, 2023 · 1 comment · Fixed by #213
Closed

Operations exists() and length() on Path #214

StefanOltmann opened this issue Aug 22, 2023 · 1 comment · Fixed by #213
Assignees

Comments

@StefanOltmann
Copy link

I want the operations exists() and length() from java.io.File on the common Path object to check the existence of a provided file before opening it an causing an error.

I don't know how to check existence in the native posix code, but a least for file size the fseek() & ftell() functions can be used.

@fzhinkin
Copy link
Collaborator

There's a PR extending file systems support, exists is already there. I'll add a way to get a file size there.

@fzhinkin fzhinkin self-assigned this Aug 22, 2023
@fzhinkin fzhinkin linked a pull request Aug 23, 2023 that will close this issue
fzhinkin added a commit that referenced this issue Sep 13, 2023
* Added FileSystem interface providing basic operations on paths: reading/writing files, creating directories, moving and deleting files and directories, and gathering fs node metadata.
* Provided default FileSystem implementation - SystemFileSystem
* Extended Path API to allow getting parent paths and constructing children's paths using platform-dependent APIs under the hood.
* Added API to get path to the system temporary directory

Closes: #206 #211 #212 #183 #214

---------

Co-authored-by: Jeff Lockhart <[email protected]>
@fzhinkin fzhinkin added the fs label Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants