Files 1.6.0
This release of Files brings everything from the 1.5.x
releases and more to make handling files & folders even easier π
You can now...
- Return either an existing subfolder or file for a given name, or create one if missing - using
folder.createSubfolderIfNeeded(withName:)
andfolder.createFileIfNeeded(withName:contents:)
. - Easily access a folder deeper within a parent folder's tree, by calling
try folder.subfolder(atPath: "A/B/C")
. - Easily access a file at a path relative to a folder using
folder.file(atPath: "A/B/C.txt")
. - Read a file either as a
String
or anInt
, usingreadAsString()
andreadAsInt()
. - Access the current folder using
FileSystem().currentFolder
. - Create a file directly using a path, and create any intermediate parent folders if they don't exist - using
FileSystem().createFile(at:)
.
Also...
- When accessing the current folder, it now has a trailing
/
in its path like all other folders. - A bug was fixed that would previously cause tildes (
~
) not to be expanded when used for the path when creating a folder usingFileSystem.createFolder(at:)
.