---
title: "changeCurrentDirectoryPath(_:)"
framework: foundation
role: symbol
role_heading: Instance Method
path: "foundation/filemanager/changecurrentdirectorypath(_:)"
---

# changeCurrentDirectoryPath(_:)

Changes the path of the current working directory to the specified path.

## Declaration

```swift
func changeCurrentDirectoryPath(_ path: String) -> Bool
```

## Parameters

- `path`: The path of the directory to which to change.

## Return Value

Return Value true if successful, otherwise false.

## Discussion

Discussion All relative pathnames refer implicitly to the current working directory. warning: This method changes the current working directory for the current process, not just the receiver.

## See Also

### Related Documentation

- [fileExists(atPath:isDirectory:)](foundation/filemanager/fileexists(atpath:isdirectory:).md)
- [contentsOfDirectory(atPath:)](foundation/filemanager/contentsofdirectory(atpath:).md)

### Managing the current directory

- [currentDirectoryPath](foundation/filemanager/currentdirectorypath.md)
