2 // NSString+FixFilename.h
5 // Created by Joe Wreschnig on 3/7/13.
9 #import <Foundation/Foundation.h>
11 @interface
NSCharacterSet (FixFilename
)
13 + (NSCharacterSet
*)invalidPathComponentCharacterSet
;
14 // A character set containing the characters that are invalid to
15 // use in path components on common filesystems.
19 @interface
NSString (FixFilename
)
21 - (NSString
*)stringByFixingPathComponent
;
22 // Does various operations to make this string suitable for use as
23 // a single path component of a normal filename. Removes
24 // characters that are invalid. Strips whitespace from the
25 // beginning and end. If the first character is a . or a -, a _ is
26 // added to the front.