-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[MNG-8587] mvnsh navigation #2117
base: master
Are you sure you want to change the base?
Conversation
Ability to navigate on disk --- https://issues.apache.org/jira/browse/MNG-8587
@gnodet |
|
||
public void changeDirectory(String seg) { | ||
requireNonNull(seg, "seg"); | ||
if ("..".equals(seg)) { |
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.
I don't the point for this specific test.
What if you cd ../.
, that would be the same ?
Also directory.resolve("..")
should work, so I don't get why we'd need this branch.
|
||
import static java.util.Objects.requireNonNull; | ||
|
||
public class Directory implements Supplier<Path>, Function<String, Path> { |
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.
That looks overkill to me. Why do we use Function<String, Path>
instead of just a Path
btw ?
And have a non final
Path
field for the cwd
?
It seems to create a new API on top of the Path API, but not sure what the value is.
Ability to navigate on disk
https://issues.apache.org/jira/browse/MNG-8587