<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/ObjectCaptureSession/Error/directoryNotEmpty(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "RealityKit",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:19_RealityKit_SwiftUI20ObjectCaptureSessionC5ErrorO17directoryNotEmptyyAE10Foundation3URLVcAEmF"
  },
  "title" : "ObjectCaptureSession.Error.directoryNotEmpty(_:)"
}
-->

# ObjectCaptureSession.Error.directoryNotEmpty(_:)

We cannot continue a pre-existing capture, so if an output directory is provided that already exists and
it is not empty, this error is thrown.

```
case directoryNotEmpty(URL)
```

---

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)