Amazon.com Widgets 16-5 with Append
Welcome, Guest. Please login or register.
Did you miss your activation email?
August 21, 2014, 07:04:15 AM
Home Help Search chat Login Register 
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan
                     

+ Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+ Old Stuff
| |-+ Answers to Exercises
| | |-+ Chapter 16 (Moderator: sgg_admin)
| | | |-+ 16-5 with Append
Pages: [1] Go Down
Print
Author Topic: 16-5 with Append (Read 861 times)
varsis
Newbie
*
Posts: 1


Email




on: September 28, 2010, 08:27:29 AM

Code: (Objective-C)
@interface NSString (TempFiles)
+(NSString *) temporaryFileName;
-(NSString *) appendTemporaryFileName;
@end


@implementation NSString (TempFiles)
+(NSString *) temporaryFileName {

return [[NSProcessInfo processInfo] globallyUniqueString];

}

-(NSString *) appendTemporaryFileName {

return [self stringByAppendingString:[NSString temporaryFileName]];

}
@end

I thought it might be good to include a append, working some files my self, i find that a lot of the time you do get this and usually it would be a "Copy" or 1,2 ect... added on.
Logged
Pages: [1] Go Up
Print
Jump to:



Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 classroomM.com. All rights reserved.