26 #import <Foundation/Foundation.h>
43 NSURL *shortcutURL = [[NSURL alloc] initFileURLWithFileSystemRepresentation:filepath
46 const NSURL *targetURL = [NSURL URLByResolvingAliasFileAtURL:shortcutURL
47 options:NSURLBookmarkResolutionWithoutUI
49 const BOOL isSame = [shortcutURL isEqual:targetURL] and
50 ([[[shortcutURL path] stringByStandardizingPath]
51 isEqualToString:[[targetURL path] stringByStandardizingPath]]);
53 if (targetURL == nil) {
57 [targetURL getFileSystemRepresentation:r_targetpath maxLength:
FILE_MAXDIR];
61 if (![targetURL getFileSystemRepresentation:r_targetpath maxLength:
FILE_MAXDIR]) {
76 const NSURL *fileURL = [[NSURL alloc] initFileURLWithFileSystemRepresentation:path
79 NSArray *resourceKeys =
80 @[ NSURLIsAliasFileKey, NSURLIsHiddenKey, NSURLIsReadableKey, NSURLIsWritableKey ];
82 const NSDictionary *resourceKeyValues = [fileURL resourceValuesForKeys:resourceKeys
error:nil];
84 const bool is_alias = [resourceKeyValues[(void)(
@"@%"), NSURLIsAliasFileKey] boolValue];
85 const bool is_hidden = [resourceKeyValues[(void)(
@"@%"), NSURLIsHiddenKey] boolValue];
86 const bool is_readable = [resourceKeyValues[(void)(
@"@%"), NSURLIsReadableKey] boolValue];
87 const bool is_writable = [resourceKeyValues[(void)(
@"@%"), NSURLIsWritableKey] boolValue];
95 if (is_readable && !is_writable) {
File and directory operations.
CCL_NAMESPACE_BEGIN struct Options options
static void error(const char *str)
eFileAttributes BLI_file_attributes(const char *path)
bool BLI_file_alias_target(const char *filepath, char r_targetpath[FILE_MAXDIR])