| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
We were finding the parent of the relative path and then passing this
to the BedrockFilePath::from_path constructor, but this constructor
expects to be passed an absolute path and so was unconditionally
returning None.
|
|
|
|
|
|
|
|
| |
This is the Windows side of the refactoring job. The windows crate has
been added as a dependency in order to get a list of available drives
by drive letter, and a virtual top-level root directory has been
implemented in the Windows code to make it possible for programs to
hierarchically navigate between available drives.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The major feature of this refactor is the creation of BedrockFilePath,
a type which can be losslessly converted into an operating-system
specific path or a Bedrock-style byte path. It also prevents file paths
which can't be represented as Bedrock-style byte paths from being
constructed, and allows the use of a base directory which acts as an
inescapable sandbox.
BedrockFilePath will support the creation of a virtual root directory
on Windows which will allow navigation between drive letters via the
standard hierarchical navigation ports.
This commit has been tested on Linux, but not yet Windows. Further work
is expected before the new code will work on Windows.
|
|
|
|
|
| |
Some Windows-only library functions were added in during a previous
commit while I was developing on Windows.
|
|
|
|
|
|
|
|
| |
Construction of OsStrings is handled differently between Windows and
Unix, using platform-specific APIs.
The method OsStr::as_bytes was also changed to OsStr::as_encoded_bytes
at some point between Rust versions 1.69 and 1.80.
|
|
|
|
|
|
|
| |
It was previously assumed that every entry in a directory would be
either a file or a directory, but a non-file and non-directory entry
has been encountered in the wild. In this case, just ignore the file,
leaving it out of the directory listing.
|
| |
|
|
|
|
|
|
| |
This is a temporary fix to make directories more navigable. This will
be removed when Cobalt can hide dot-prefixed filenames from directory
listings by itself.
|
| |
|
| |
|
| |
|
|
This is a complete redesign of the file device. The most notable
addition is the ability to ascend and descend the file tree.
|