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

        }

        do {
            let name = path.substring(from: path.index(path.startIndex, offsetBy: parentPath.characters.count + 1))
            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 = String(path[..<parentReferenceRange.lowerBound])

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