Skip to content

Releases: JohnSundell/Files

Files 1.6.2

02 Apr 14:55
Compare
Choose a tag to compare

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

24 Mar 18:07
Compare
Choose a tag to compare

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

20 Mar 19:10
Compare
Choose a tag to compare

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:) and folder.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 an Int, using readAsString() and readAsInt().
  • 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 using FileSystem.createFolder(at:).

Files 1.5.5

12 Mar 13:23
Compare
Choose a tag to compare
  • 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

11 Mar 23:03
Compare
Choose a tag to compare

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

11 Mar 21:15
Compare
Choose a tag to compare
  • You can now read a file either as a String or an Int, using readAsString() and readAsInt().
  • 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

10 Mar 16:20
Compare
Choose a tag to compare

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

07 Mar 21:36
Compare
Choose a tag to compare

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

07 Mar 18:16
Compare
Choose a tag to compare
  • 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

19 Feb 15:23
Compare
Choose a tag to compare
  • 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.

⚠️ Deprecations:

  • This release deprecates Folder.Error.creatingSubfolderFailed in favor of Folder.Error.creatingFolderFailed. The old symbol will be removed in Files 1.5.0.