         }
 
         do {
-            let name = path.substring(from: path.index(path.startIndex, offsetBy: parentPath.characters.count + 1))
+            let index = path.index(path.startIndex, offsetBy: parentPath.characters.count + 1)
+            let name = String(path[index...])
             return try createFolder(at: parentPath).createFile(named: name, contents: contents)
         } catch {
             throw File.Error.writeFailed

        var filledIn = false

        while let parentReferenceRange = path.range(of: "../") {
            let currentFolderPath = path.substring(to: parentReferenceRange.lowerBound)

            guard let currentFolder = try? Folder(path: currentFolderPath) else {
                throw FileSystem.Item.PathError.invalid(path)

            }

            let endIndex = name.index(name.endIndex, offsetBy: -`extension`.characters.count - 1)
            return String(name[..<endIndex])
        }
        
        /// Any extension that the item has
