Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
OS Xファイルが文房具パッドであるかどうかを検出する、承認された非推奨の方法はありますか?
私が判断できる限り、 isStationery キーを提供する NSFileManager メソッドはなく、古い FSpGetFInfo() メソッドはもちろん非推奨です。
これはおそらく承認されていないが、非推奨ではないアイデアです。そのため、それがあなたを幸せにするかどうかはわかりません. Finder 属性 (FileInfoおよびExtendedFileInfo構造体) は、「com.apple.FinderInfo」という名前の 32 バイトの拡張属性に格納されているようです。getxattrまたはfgetxattr関数を使用してそれを読み取ることができます。
FileInfo
ExtendedFileInfo
getxattr
fgetxattr