Return to Snippet

Revision: 28750
at July 14, 2010 00:12 by gfazioli


Initial Code
- (NSString *)getFilenameFromRequest:(NSURLRequest *)request avoidExtension:(BOOL)avoidExtension {
	NSString *filePath = [[[request URL] path] lastPathComponent];
	if (avoidExtension) {
		NSArray *a = [filePath componentsSeparatedByString:@"."];
		return [a objectAtIndex:0];
	}
	return filePath;
}

Initial URL
http://www.undolog.com

Initial Description
Get a filename part from a NSURLRequest. Optionally remove extension

Initial Title
getFilenameFromRequest

Initial Tags
iphone

Initial Language
ActionScript 3