Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check if directory exists at particular path programmatically in Objective-C?

Please tell me how to

  1. Get the current working directory's absolute path

  2. If this is the absolute path /Users/iphone/Documents/Archive

    how to convert this path to relative path?

  3. How to check if directory exists at patricular path programmatically in Objective-C and if it doesn't exist how to create it programmatically? i need to do this using relative path.

Thank You.

like image 587
suse Avatar asked Nov 20 '25 17:11

suse


1 Answers

The main source of information is the Apple File System Programming Guide

From there or subtopics you get information for your questions.

1) NSFileManager currentDirectoryPath

3) NSFileManager fileExistsAtPath:isDirectory:

like image 193
mmmmmm Avatar answered Nov 23 '25 07:11

mmmmmm



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!