Load a file in a group objective-c Xcode

Posted by okami on Stack Overflow See other posts from Stack Overflow or by okami
Published on 2010-05-12T21:22:48Z Indexed on 2010/05/12 23:14 UTC
Read the original article Hit count: 423

Filed under:
|
|
|
|

I'd like to load a file from a specific Group in Xcode/Objective-c

for example:

I have TWO files named "SomeFile.txt" that are in two different folders (folders not groups yet) in the OS:

SomeFolderOne |- SomeFile.txt

SomeFolderTwo |- SomeFile.txt

Inner Xcode I make two folders, and I put a REFERENCE to these two files:

SomeGroupOne |- SomeFile.txt // this file is a reference to the SomeFile.txt from SomeFolderOne

SomeGroupTwo |- SomeFile.txt // this file is a reference to the SomeFile.txt from SomeFolderTwo

Now I want to read the txt content with:

NSString *contents = [NSString stringWithContentsOfFile:@"SomeFile.tx" encoding:NSUTF8StringEncoding error:nil];

Ok it reads the 'SomeFile.txt' but sometimes the file read is from SomeGroupOne and sometimes the file is read from SomeGroupTwo.

How to specify the group I want the file to be read?

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about xcode