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 = @[ NSURLIsSymbolicLinkKey, NSURLIsAliasFileKey, NSURLIsHiddenKey ];
144 NSURLIsSymbolicLinkKey,
152 NSDictionary *resourceKeyValues = [fileURL resourceValuesForKeys:resourceKeys
error:nil];
154 const bool is_symlink = [resourceKeyValues[(void)(
@"@%"), NSURLIsSymbolicLinkKey] boolValue];
155 const bool is_alias = [resourceKeyValues[(void)(
@"@%"), NSURLIsAliasFileKey] boolValue] &&
157 const bool is_hidden = [resourceKeyValues[(void)(
@"@%"), NSURLIsHiddenKey] boolValue];
158 const bool is_readable = is_offline ||
159 [resourceKeyValues[(void)(
@"@%"), NSURLIsReadableKey] boolValue];
160 const bool is_writable = is_offline ||
161 [resourceKeyValues[(void)(
@"@%"), NSURLIsWritableKey] boolValue];
172 if (is_readable && !is_writable) {