Releases: JohnSundell/Files
Files 1.6.2
This release of Files patches a bug that would cause files created using FileSystem.createFile(at:)
to get an invalid name. Thanks to @pixyzehn for fixing this 🎉
Files 1.6.1
Files now correctly handles paths that contains parent references, by expanding those references into absolute paths.
So ../file
is expanded to <currentFolderParent>/file
.
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:)
.
Files 1.5.5
- When using the methods that only create a file/folder when needed, you no longer get a warning if you don't use the result.
- When accessing the current folder, it now has a trailing
/
in its path like all other folders. - You can now access the current folder using
FileSystem().currentFolder
.
Files 1.5.4
This release is a bug fix that would previously cause tildes (~
) not to be expanded when used for the path when creating a folder using FileSystem.createFolder(at:)
.
Files 1.5.3
- You can now read a file either as a
String
or anInt
, usingreadAsString()
andreadAsInt()
. - You can now easily access a file at a path relative to a folder using
folder.file(atPath:)
. - You can now create a file only if it's missing using
folder.createFileIfNeeded(withName:contents:)
.
Files 1.5.2
You can now easily access a folder deeper within a parent folder's tree, by calling:
try folder.subfolder(atPath: "A/B/C")
instead of having to retrieve all the intermediate folders.
Files 1.5.1
You can now either return an existing subfolder for a given name, or create one if missing - using Folder.createSubfolderIfNeeded(withName:)
.
Files 1.5.0
- You can now either return an existing folder for a given path, or create one if missing - using
FileSystem.createFolderIfNeeded(at:)
. - You can now move the entire contents of a folder to a new parent folder using
Folder.moveContents(to:)
.
Files 1.4.0
- You can now retrieve the current user's Document folder, and the Library folder using
FileSystem
. Thanks to @onurersel for implementing this! - When emptying a folder, you can now choose to include hidden (dot) files.
- You can now create a path of folders directly (with intermediate folders) using
FileSystem
.
- This release deprecates
Folder.Error.creatingSubfolderFailed
in favor ofFolder.Error.creatingFolderFailed
. The old symbol will be removed in Files1.5.0
.