How to read multiple TXT files and save the strings in a Nsarray?

Asked

Viewed 501 times

-1

Explanation of the scenario:

Read the contents of various extension files .txt and save the strings of each file separately in one NSArray, in this case, in each index of the array.

Obstacle: - There are more than 60 different files, although the text is small. - Have different names Ex.: descDeVassoura.txt, descLampada.txt.

NOTE: I already got a method to read the files and store in a string. But the problem is to read several files at once, and have control in the ordering in which they are kept in the NSArray.

1 answer

0


For those with this problem, of having to read several files with different names, you can put their names as numbers and use a looping for to point to each of them.

OR

Best proposal, is to use a database, in the case of Sqlite, recommend the use of the Core Data framework to do the management.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.