currentWorkingDirectory

Returns the path of the current working directory.

FileSystem.swift:625
iOS
13.0+
macOS
10.15+
tvOS
13.0+
watchOS
6.0+
var currentWorkingDirectory: FilePath { get async throws }

Returns

The path to the current working directory.

Implementation details

Uses the getcwd(2) system call.