openDirectory(atPath:options:)

Open the directory at path.

FileSystem.swift:193
iOS
13.0+
macOS
10.15+
tvOS
13.0+
watchOS
6.0+
func openDirectory(atPath path: FilePath, options: OpenOptions.Directory) async throws -> DirectoryFileHandle

Parameters

path

The path of the directory to open.

options

How the directory should be opened.

Returns

A handle to the opened directory.

Errors

Error codes thrown include:

Implementation details

Uses the open(2) system call.