Create an NSURL
NSURL * theURL = [NSURL URLWithString: @"http://foo.bar/whatever.php"];
Fetch the data with NSData
NSData * theData = [NSData dataWithContentsOfURL: theURL];
Save it to a file with the same NSData object
NSString * theFolder = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
NSString * theFileName = [theFolder stringByAppendingPathComponent:@"MyFile.txt"]
[theData writeToFile:theFileName atomically:true];
Use NSFileManager to list the files in the folder
NSError *error = nil;
NSFileManager* fileManager = [NSFileManager defaultManager];
NSArray * filesInFolderStringArray = [fileManager contentsOfDirectoryAtPath:theFolder error:error];
This will give you an array of NSStrings with the names of the files in the folder.