gpt4 book ai didi

macos - 检测文件/文件夹的删除和添加 cocoa

转载 作者:行者123 更新时间:2023-12-03 17:12:25 24 4
gpt4 key购买 nike

我想了解如何检测文件夹或文件是否被删除或添加到我的代码中列出的指定文件夹中,没有太多需要详细说明的。

最佳答案

使用File System Events

The file system events API provides a way for your application to ask for notification when the contents of a directory hierarchy are modified.

看看Using the File System Events API

The File System Events API consists of several distinct groups of functions. You can obtain general information about volumes and events by using functions that begin with FSEvents.

关于macos - 检测文件/文件夹的删除和添加 cocoa,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18284508/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com