---
title: FSVolume.OpenCloseOperations
framework: fskit
role: symbol
role_heading: Protocol
path: fskit/fsvolume/opencloseoperations
---

# FSVolume.OpenCloseOperations

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

## Declaration

```swift
protocol OpenCloseOperations : NSObjectProtocol
```

## Overview

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. note: Use FSVolume.OpenCloseHandler instead.

## Topics

### Opening and closing

- [FSVolume.OpenModes](fskit/fsvolume/openmodes.md)

### Inspecting volume properties

- [isOpenCloseInhibited](fskit/fsvolume/opencloseoperations/isopencloseinhibited.md)

### Instance Methods

- [closeItem(_:modes:replyHandler:)](fskit/fsvolume/opencloseoperations/closeitem(_:modes:replyhandler:).md)
- [openItem(_:modes:replyHandler:)](fskit/fsvolume/opencloseoperations/openitem(_:modes:replyhandler:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Deprecated

- [FSVolume.Operations](fskit/fsvolume/operations.md)
- [FSVolume.ReadWriteOperations](fskit/fsvolume/readwriteoperations.md)
- [FSVolume.AccessCheckOperations](fskit/fsvolume/accesscheckoperations.md)
- [FSVolume.RenameOperations](fskit/fsvolume/renameoperations.md)
- [FSVolume.PreallocateOperations](fskit/fsvolume/preallocateoperations.md)
- [FSVolume.XattrOperations](fskit/fsvolume/xattroperations.md)
- [FSVolume.ItemDeactivation](fskit/fsvolume/itemdeactivation.md)
- [FSVolumeKernelOffloadedIOOperations](fskit/fsvolumekerneloffloadediooperations.md)
