Description
Initial development of vfs tried to constrain functionality to what we could accomplish in all filesystems we could think of (ie., unix os, windows os, AWS S3, Google Storage, Azure Blob storage, SFTP, etc). We decided that when default behaviors between filesystems conflicted, we'd choose the os behavior as pattern we'd most closely follow. Along with this, we borrowed some terminology from os that may not apply everywhere, including File
, Volume
, ChangeDir
. However, as it turns out, that while our use of URI as the means for resource locating has worked extremely well, the terms Volume
and ChangeDir
are not universally applicable.
Volume
scheme host
__/ ___/____ port
/ \ / \ /\
sftp://someuser@server.com:22/path/to/file.txt
\____________________/\_______________/
\______/ \ \
/ authority section path
username (Volume)
In the pattern above, for sftp (and ftp) authority is user + host + port. For s3 and gs the authority is a bucket. For mem, namespaces are the optional authority. For os (mainly for windows, unix doesn't distinguish between volumes and directories), it is optionally a volume or mount.
ChangeDir
ChangeDir(relLocPath) is the only place we actually use the term "Dir" (vs Location). It updates the existing Location's path to the provided relative location path. As far as I can see, its behavior is redundant.
We can accomplish the same thing by doing:
// Instead of
err := currentLoc.ChangeDir(relLocPath)
// use
currentLoc, err := currentLoc.NewLocation(relLocPath)
Proposed
- add Authority() function
- update all internal references from Volume() to Authority
- deprecate Volume() function in v7 to be removed in v8.
- replace all documentation reference to Volume both in public functions and concept be changes to use authority.
- deprecate ChangDir to be removed in v8