openDirectory(atPath:)

    Opens the directory at path and returns a handle to it.

    FileSystemProtocol.swift:440
    iOS
    13.0+
    macOS
    10.15+
    tvOS
    13.0+
    watchOS
    6.0+
    func openDirectory(atPath path: FilePath) async throws -> DirectoryFileHandle

    Parameters

    path

    The path of the directory to open.

    Returns

    A handle to the opened directory.

    The directory being opened must already exist otherwise this function will throw an error. Use createDirectory(at:withIntermediateDirectories:permissions:) to create directories.

    Other members in extension

    Instance members

    Show obsolete interfaces (1)

    Hide obsolete interfaces