You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resolve#170
This PR adds a `def root(root: String, fileSystem: FileSystem): Path` in
`os` package object. Additionally, it adds `root` and `filesystem`
members to `Path`. It addresses two problems:
- Specifying custom roots for a path
- Using custom filesystems
## Filesystem
Filesystem was added as a field of the `os.Path`. It was not added as a
Root field for simplicity and consistency with Java's `nio`. Root is a
part of the path; filesystem is the context of the whole path. One
filesystem can have many roots; one root can have many subdirectories.
## Root as String
A string is the simplest type that can represent the path's root. It
also corresponds to the mental model of the path - usually, developers
perceive it as a String. Therefore - String was chosen as the type of
root.
Pull request: #196
---------
Co-authored-by: Li Haoyi <[email protected]>
0 commit comments