         }
 
         guard FileManager.default.changeCurrentDirectoryPath(path.pathString) else {
-            throw FileSystemError(.unknownOSError, path)
+            throw FileSystemError(.couldNotChangeDirectory, path)
         }
     }
 

        /// This is thrown when copying or moving a file or directory but the destination
        /// path already contains a file or folder.
        case alreadyExistsAtDestination
    }

    /// The kind of the error being raised.

                throw FileSystemError(.ioError(code: errno), path)
            }
            if n != contents.count {
                throw FileSystemError(.mismatchedByteCount(expected: contents.count, actual: n), path)
            }
            break
        }
