On Mac, the first case, if the name of a file or dir is start with the ".", then it is hidden.
another case, for example:
/Users/USER_NAME/Library
/bin
Their names do not start with ".", but their is hidden.
I got all attributes of '/Users/USER_NAME/Library':
objective-c
NSError * error;
NSDictionary *attributes = [[NSFileManager defaultManager] attributesOfItemAtPath:filePath error:&error];
output:
{
NSFileCreationDate = "2019-06-04 23:44:56 +0000";
NSFileExtensionHidden = 0;
NSFileGroupOwnerAccountID = 20;
NSFileGroupOwnerAccountName = staff;
NSFileModificationDate = "2021-10-31 18:47:57 +0000";
NSFileOwnerAccountID = 501;
NSFileOwnerAccountName = xxxxxxxx;
NSFilePosixPermissions = 448;
NSFileProtectionKey = NSFileProtectionCompleteUntilFirstUserAuthentication;
NSFileReferenceCount = 79;
NSFileSize = 2528;
NSFileSystemFileNumber = 360719;
NSFileSystemNumber = 16777221;
NSFileType = NSFileTypeDirectory;
}
I not found whether to hide related attribute(s).