32 NSURL *shortcutURL = [[NSURL alloc] initFileURLWithFileSystemRepresentation:filepath
38 NSURL *targetURL = [NSURL URLByResolvingAliasFileAtURL:shortcutURL
39 options:NSURLBookmarkResolutionWithoutUI |
40 NSURLBookmarkResolutionWithoutMounting
42 const BOOL isSame = [shortcutURL isEqual:targetURL] and
43 ([[[shortcutURL path] stringByStandardizingPath]
44 isEqualToString:[[targetURL path] stringByStandardizingPath]]);
46 if (targetURL == nil) {
50 [targetURL getFileSystemRepresentation:r_targetpath maxLength:
FILE_MAXDIR];
54 if (![targetURL getFileSystemRepresentation:r_targetpath maxLength:
FILE_MAXDIR]) {
130 NSURL *fileURL = [[[NSURL alloc] initFileURLWithFileSystemRepresentation:path
132 relativeToURL:nil] autorelease];
136 NSArray *resourceKeys =
nullptr;
140 resourceKeys = @[ NSURLIsAliasFileKey, NSURLIsHiddenKey ];
144 @[ NSURLIsAliasFileKey, NSURLIsHiddenKey, NSURLIsReadableKey, NSURLIsWritableKey ];
147 NSDictionary *resourceKeyValues = [fileURL resourceValuesForKeys:resourceKeys
error:nil];
149 const bool is_alias = [resourceKeyValues[(void)(
@"@%"), NSURLIsAliasFileKey] boolValue];
150 const bool is_hidden = [resourceKeyValues[(void)(
@"@%"), NSURLIsHiddenKey] boolValue];
151 const bool is_readable = is_offline ||
152 [resourceKeyValues[(void)(
@"@%"), NSURLIsReadableKey] boolValue];
153 const bool is_writable = is_offline ||
154 [resourceKeyValues[(void)(
@"@%"), NSURLIsWritableKey] boolValue];
162 if (is_readable && !is_writable) {