FSKit removeItem Not Being Called - Volume Operations Issue

This thread has been locked by a moderator; it no longer accepts new replies.

I'm developing a custom file system using FSKit. After testing some example projects on github and have encountered an issue where the removeItem(_:named:fromDirectory:) method in my FSVolume.Operations implementation is not being invoked when attempting to delete files or directories through Finder or the command line.

Environment: macOS: macOS 26.1 Xcode: 16.2 / 17A400 Sample Project:

My volume implements the required FSVolume.Operations protocol with the following removeItem implementation:

func removeItem(
    _ item: FSItem,
    named name: FSFileName,
    fromDirectory directory: FSItem
) async throws {
    logger.info("remove: \(name)")
    if let item = item as? MyFSItem, let directory = directory as? MyFSItem {
        directory.removeItem(item)
    } else {
        throw fs_errorForPOSIXError(POSIXError.EIO.rawValue)
    }
}

Steps to Reproduce:

  1. Mount the custom FSKit-based file system
  2. Create files using Finder or terminal (works correctly - createItem is called)
  3. Attempt to delete a file using:
  • Terminal command: rm -rf /path/to/mounted/file
  • option+cmd+delete force to delete file

Expected Behavior:

The removeItem(_:named:fromDirectory:) method should be called, logging "remove: [filename]" and removing the item from the directory's children collection.

Actual Behavior:

The removeItem method is never invoked. No logs appear from this method. The deletion operation either fails silently or returns an error, but the callback never occurs.

Are there specific volume capabilities or entitlements required for removeItem to be invoked or are there any known issues with deletion operations in the current FSKit implementation?

Any guidance would be greatly appreciated.

Answered by DTS Engineer in 867781022

Let’s focus this discussion on your other thread.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Boost

Let’s focus this discussion on your other thread.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

FSKit removeItem Not Being Called - Volume Operations Issue
 
 
Q