Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add root to Path & root constructor #196
Add root to Path & root constructor #196
Changes from 7 commits
77310e3
ec20384
00adf74
3fb0c4d
b46fa04
8e73732
39994de
bcd2be3
81ef064
27e6e74
33d1b98
121002a
e61bf06
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add a few more operations here? e.g.
Running more operations we expect should work on
foo.jar
:os.read
,os.read.*
,os.write
,os.write.*
,os.list
,os.walk
,os.remove
,os.remove.all
,os.copy
,os.move
,os.makeDir
Some negative examples of running operations that we should expect to fail when run on an
os.Path
insidefoo.jar
:os.symlink
,os.temp
with an explicitdir: os.Path
,os.stat
,os.perms
,os.proc()
passing theos.Path
insidefoo.jar
both as aos.Shellable
andcwd
/stdin
/stdout
/stderr
. Assert on the exception type so we know what we're getting back on failure; the underlyingjava.nio
exception is fine for the cases where things already fail when they should, though some things likeos.proc
we may have to check and throw our own exceptionFurther manipulation of the paths with a custom filesystem via
os.up
,/ os.RelPath
,/ os.SubPath
, and ensuring the root ends up in the same placeChecking that
os.Path
s with the same segments but differentroot
s or differentfilesystem
do not return==
to each otheros.relativeTo
andos.subRelativeTo
between paths on different filesystems should probably throw an exception, so let's assert that. Should they also throw exceptions when run between paths on different roots on the same filesystem?This is enough stuff that it's probably worth moving the test suite into a separate file