summaryrefslogtreecommitdiff
path: root/src/devices/file
Commit message (Collapse)AuthorAge
* Prevent unused variable warning on LinuxBen Bridle2024-08-11
| | | | | The base variable is only used when compiling on Windows, so an unused variable warning is raised when compiling on Linux.
* Fix ascend-to-parent behaviour of file deviceBen Bridle2024-08-10
| | | | | | | 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.
* Refactor the file deviceBen Bridle2024-08-07
| | | | | | | | 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.
* Refactor the file deviceBen Bridle2024-08-06
| | | | | | | | | | | | | | | | 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.
* Fix compilation on LinuxBen Bridle2024-08-04
| | | | | Some Windows-only library functions were added in during a previous commit while I was developing on Windows.
* Update file device to compile on WindowsBen Bridle2024-07-30
| | | | | | | | 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.
* Fix crash when loading a directory containing weird entriesBen Bridle2024-06-30
| | | | | | | 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.
* Improve error messageBen Bridle2024-06-09
|
* Hide all dot-prefixed files from directory listingsBen Bridle2024-06-09
| | | | | | 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.
* Sort directory children in case-agnostic alphabetic orderBen Bridle2024-05-30
|
* Flush file contents each frame and when closing the fileBen Bridle2024-04-24
|
* Update devices to match new specificationsBen Bridle2024-04-16
|
* Implement new file device interfaceBen Bridle2024-01-31
This is a complete redesign of the file device. The most notable addition is the ability to ascend and descend the file tree.