Changelog
0.1.0 - 2021-07-21
Added
- Added
FileMode.type
to get theFileType
fromFileMode
. - Added
FileMode.rawType
to get the file type bits fromFileMode
. - Added a
clear
parameter toCPIOArchiveWriter.finalize
, if set, this will reset the state of the writer so it can be used again. - Added CreateArchive, WriteArchive, and ExtractArchive to the examples.
Removed
- Removed
FileType.dir
. It has been renamed todirectory
.
Migration Guide
Use FileMode.is(_:)
instead of isSymlink
, and isRegularFile
:
// Before
if header.mode.isSymlink {
// `header` describes a symbolic link.
}
// After
if header.mode.is(.symlink) {
// `header` describes a symbolic link.
}