<!--
{
  "availability" : [
    "macOS: 15.4.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "FSKit",
  "identifier" : "/documentation/FSKit/FSVolume/OpenCloseOperations",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "FSKit"
    ],
    "preciseIdentifier" : "c:objc(pl)FSVolumeOpenCloseOperations"
  },
  "title" : "FSVolume.OpenCloseOperations"
}
-->

# FSVolume.OpenCloseOperations

Methods and properties implemented by volumes that want to receive open and close calls for each item.

```
protocol OpenCloseOperations : NSObjectProtocol
```

## Overview

When a file system volume conforms to this protocol, the kernel layer issues an open call to indicate desired access, and a close call to indicate what access to retain.
A file is fully closed when the kernel layer issues a close call with no retained open nodes.
When a file system receives the close call, it removes all access to the item.
When all memory mappings to the item release, the kernel layer issues a final close.

If a file system volume doesn’t conform to this protocol, the kernel layer can skip making such calls to the volume.

> Deprecated: Use ``doc://FSKit/documentation/FSKit/FSVolume/OpenCloseHandler`` instead.

## Topics

### Opening and closing

[`openItem(_:modes:replyHandler:)`](/documentation/FSKit/FSVolume/OpenCloseOperations/openItem(_:modes:replyHandler:))

Opens a file for access.

[`closeItem(_:modes:replyHandler:)`](/documentation/FSKit/FSVolume/OpenCloseOperations/closeItem(_:modes:replyHandler:))

Closes a file from further access.

[`FSVolume.OpenModes`](/documentation/FSKit/FSVolume/OpenModes)

Defined modes for opening a file.

### Inspecting volume properties

[`isOpenCloseInhibited`](/documentation/FSKit/FSVolume/OpenCloseOperations/isOpenCloseInhibited)

A Boolean value that instructs FSKit not to call this protocol’s methods, even if the volume conforms to it.



---

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)