- (NSArray *)contentsOfDirectoryAtPath:(NSString *)path error:(NSError **)error
I return the content of my strings array and a content of a random local folder using contentsOfDirectoryAtPath.
in:
- (NSDictionary *)attributesOfItemAtPath:(NSString *)path userData:(id)userData error:(NSError **)error
and in:
- (NSDictionary *)attributesOfFileSystemForPath:(NSString *)path error:(NSError **)error
i return 2 styles of attributes:
1. for the local items i return the items attributes using NSFileManager:
NSDictionary* attribs = [[NSFileManager defaultManager] attributesOfItemAtPath:p error:error];
2. for the virtual files (those from the array), I return a dummy temp attributes like this:
NSDate *creationDate = [NSDate date];
NSDate *modificationDate = [NSDate date];
NSDictionary *attributes = @{ NSFileCreationDate : creationDate,
NSFileModificationDate : modificationDate,
NSFileExtensionHidden : @(0),
NSFileGroupOwnerAccountID : @(20),
NSFileGroupOwnerAccountName : @"myFile",
NSFileHFSCreatorCode : @(0),
NSFileHFSTypeCode : @(0),
NSFileOwnerAccountID : @(501),
NSFilePosixPermissions : @(420),
NSFileReferenceCount : @(1),
NSFileSize : @(5445555),
NSFileSystemFileNumber : @(107406206),
NSFileSystemNumber : @(16777217),
NSFileType : NSFileTypeRegular
};
The issue is as follow:
When I am dragging or pasting a local file ( a file which really exist) to a any other folder, the file is being moved/copied successfully and without any errors.
When I do the same for a virtual file, the file immediately appears in the destination folder, but I get an the following error:
A newer item named “banana.png” already exists in this location. Do you want to replace it with the older one you’re moving?
--
You received this message because you are subscribed to the Google Groups "OSXFUSE" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osxfuse-grou...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.