The NSFileManager class enables you to perform various generic file-system operations and insulates an application from the underlying file system.
0
votes
2answers
30 views
Create new file and read it using NSFileManager objective c
question: I want to write to a new file some data that I already have into a NSMutableData .
I was reading in several places about this but it's not clear at all.
I was coding the next and It does ...
0
votes
3answers
36 views
NSFileManager: removing item
The problem is removing an item that´s been written using writeToFile: method, I cannot seem to remove it. I tried NSFileManager but I guess these are two different types of storage.
- (BOOL) ...
-2
votes
2answers
38 views
update progress bar during copy file with NSFileManager
I copy files then my application is finish launching from resource to caches directory.
but I want to update my progress bar during copying the files.
I copy the file with the code below:
...
2
votes
1answer
31 views
iterate dirs using filemanager take up quite a lot memory
i'm using NSFileManager's enumeratorAtPath method to calculate file size under certain dir.
NSString *iterDir = @"/path/to/dir/";
NSFileManager *fm = [[NSFileManager alloc] init];
...
1
vote
0answers
22 views
(Cocoa) Monitoring File Changes with the File System Events API
I have a task which needs to be notified when a image is copied to a folder. I found a example from: http://developer.apple.com/library/mac/#featuredarticles/FileSystemEvents/_index.html
It works ...
0
votes
1answer
19 views
Content modification date of an file in Cocoa
How can I find out when a file was last time modified in Cocoa?
I tried using NSFileModificationDate attribute of an NSFile but the modification date gets update when you read a file. I just want to ...
0
votes
0answers
42 views
Better way to merge contents of two directories?
I have a need to merge the contents of two directories for an iOS app. The two directories have many subdirectories and many files which can be several levels deep. If a file at the exact same ...
1
vote
2answers
70 views
How to get Size and free space of a directory in cocoa?
I want to access the actual size of a directory, and also free space available in a directory.
I already used [NSFileManager defaultManager]attributesOfItemAtPath:path error:&error] method.
This ...
0
votes
3answers
52 views
How would I resolve a relative path in Objective-C?
I am trying the code below to see if I can get it to expand the absolute path for those locations so that I can use them for actions with NSFileManager which fail when I use the tilde and relative ...
2
votes
0answers
11 views
Accessing user scripts directory in Mac OS X Lion
I want my app to be able to execute some user scripts which can be installed in the app-specific user scripts directory (like ~/Library/Application Scripts/appbundleidentifier), but [[NSFileManager ...
0
votes
1answer
17 views
Retrieve by specific file name from document directory in iOS
Now i am retrieving file from document directory by specific name in iOS with following code.
NSMutableArray *arrayToSearch = [[NSMutableArray alloc] init];
NSArray *paths = ...
0
votes
1answer
23 views
iOS persistence: storing and retrieving items in directory
I want to save a file to a folder, and then retrieve all the contents of that folder, so I do:
NSString *dataPath = [documentsDirectory stringByAppendingPathComponent:storageFolder];
// StorageFolder ...
-1
votes
0answers
28 views
Will Apple approve Read Only File Manager? [closed]
I would like to know if I use this open source File Manager (FSWalker)
Will my app approved or rejected ?
0
votes
1answer
18 views
URLForUbiquityContainerIdentifier was working fine, now returns nil
I've got one of the simplest methods I can write:
+(NSURL *)notesURL {
NSURL *url = [[NSFileManager defaultManager] URLForUbiquityContainerIdentifier:nil];
return [url ...
-1
votes
1answer
26 views
How to get created date of file from document directory in iOS? [duplicate]
Yes i would like to get the created date of file from document directory in iOS.
It's like NOTES App from iOS.
In Notes App , there is a date that created and modified of file.
I also want to get ...