<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSOpenStepRootDirectory()",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@F@NSOpenStepRootDirectory"
  },
  "title" : "NSOpenStepRootDirectory()"
}
-->

# NSOpenStepRootDirectory()

Returns the root directory of the user’s system.

```
func NSOpenStepRootDirectory() -> String
```

## Return Value

A string identifying the root directory of the user’s system.

## Discussion

For more information on file system utilities, see Low-Level File Management Programming Topics.

## See Also

[`NSHomeDirectory`](/documentation/Foundation/NSHomeDirectory())

Returns the path to either the user’s or application’s home directory, depending on the platform.

[`NSHomeDirectoryForUser`](/documentation/Foundation/NSHomeDirectoryForUser(_:))

Returns the path to a given user’s home directory.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)