How to get path of a file in iOS?

Ads
 

How to get path of a file in iOS?

Hi

iOS project I have added a file abg.jpg, Now I want to know the path of the image file when installed in iOS.

Pl let's know the code.

Thanks

View Answers

April 20, 2016 at 4:46 AM

Hi,

You can use following code:

NSString *filePath=[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"abc.jpg"];
NSLog(@"%@",filePath);

Thanks

Ads









Related Tutorials/Questions & Answers:
How to get path of a file in iOS?
How to get the full path location using <input type=file>
Advertisements
How to get the browsed file path into controller bean using JSF icefaces
How to get project path
How to get project path
How to get full path of the uploaded file using commons fileupload jar file
how to get java path name
How to store url path in file ?
how to get description for each file
how to get file extension in java
How to change uploaded file root path ?
how to upload multiple files in jsp and saving the path in database and the file in folder
File path for jar file
Java Construct File Path
need solution to get file name from path which should give by user
How to retrieve file name and path of an excel spreadsheet imported into Oracle Database
Java get Absolute Path
How to create file and save it into user defined path using jsp/servlet?
File Path compare in java
Java Get File Name
Problem in getting file path in js
How could we get log file as simple text format
How to give path to the Dfile?
Java Get Class path
How to get xml file form http port using web service
Constructing a File Name path
ModuleNotFoundError: No module named 'file-path'
How to get of lastmodified file list between two times in java?
Getting path name of uploading file in struts 2.8.1
java get file permission
how to set class path

Ads