[ad_1]
I wish to convert code Goal C to Kotlin multiplatform
That is Goal C code
{
NSFileManager *fileManager = [[NSFileManager alloc] init];
BOOL isDir;
BOOL exists = [fileManager fileExistsAtPath:path isDirectory:&isDir];
BOOL success = false;
if (isDir && exists) {
NSURL *pathUrl = [NSURL fileURLWithPath:path];
NSError *error = nil;
success = [pathUrl setResourceValue:isExcluded
forKey:NSURLIsExcludedFromBackupKey
error:&error];
if (!success) {
NSLog(@"Couldn't exclude AsyncStorage dir from backup %@", error);
}
}
return success;
}
In above code variable isDir use & when cross to perform fileExistsAtPath
So how can I exploit isDir like that in Kotlin. I do know that is
address-of unary operator
[ad_2]
