tags:

views:

27

answers:

0

Hi, I have following 2 queries.

1) I have developed an application for Mac. I want to copy some of the files from application bundle to the library folder of home folder. How to get path of the Library folder of home folder.

2)

I want to display the number of files of a directory in text field. I have written the following code for that

NSBundle *mainBundle = [NSBundle mainBundle];

NSString *filePath = [mainBundle resourcePath];

NSString *actionFilePath = [[filePath stringByAppendingString:@"/"]
                                stringByAppendingString:@"Osirix Automator Actions"];

NSFileManager *filemanager = [NSFileManager defaultManager];

NSString *actionsCount = (NSString *)[fileListArray count];
[actionsText setStringValue:actionCount];

but when i build and run the application, its get launched but get immediately quit itself. What could be the reason for this?