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
Improve path management and filesystem operation ergonomics (#318)
Use FilePath instead of file URL's. FilePath is recommended
as the system data type to be used to represent local file paths
for command-line tools. The methods have simpler names while
retaining the same vital path arithmetic functions. It is much
less likely that a stringer will accidentally print out a file
URL to the user when a path is intended.
Remove usage of 'FileManager.default' in favour of API's that
are far less verbose to type and read. Make top-level API functions
for operations, such as checking if a file exists, removing files,
moving them, copying them, etc. Once SwiftlyCore is imported then
these functions become available for use. These functions accept
FilePath, not URL or String for a measure of type safety. Make the
new API's async by default to permit swapping FileManager with
another implementation that has async operations.
The most common file path operation is appending. Make use of
operator overloading to make these operations much cleaner, and
clearer with the division operator.
Disable tests on Ubuntu 20.04 and RedHat UBI9 Linux due to
crashes in the Swift runtime on those distributions.
0 commit comments