Skip to content

Instantly share code, notes, and snippets.

@mauricio
Created June 22, 2012 20:04
Show Gist options
  • Select an option

  • Save mauricio/2974829 to your computer and use it in GitHub Desktop.

Select an option

Save mauricio/2974829 to your computer and use it in GitHub Desktop.
/* NSPathUtilities.h
Copyright (c) 1994-2011, Apple Inc. All rights reserved.
*/
#import <Foundation/NSString.h>
#import <Foundation/NSArray.h>
@interface NSString (NSStringPathExtensions)
+ (NSString *)pathWithComponents:(NSArray *)components;
- (NSArray *)pathComponents;
- (BOOL)isAbsolutePath;
- (NSString *)lastPathComponent;
- (NSString *)stringByDeletingLastPathComponent;
- (NSString *)stringByAppendingPathComponent:(NSString *)str;
- (NSString *)pathExtension;
- (NSString *)stringByDeletingPathExtension;
- (NSString *)stringByAppendingPathExtension:(NSString *)str;
- (NSString *)stringByAbbreviatingWithTildeInPath;
- (NSString *)stringByExpandingTildeInPath;
- (NSString *)stringByStandardizingPath;
- (NSString *)stringByResolvingSymlinksInPath;
- (NSArray *)stringsByAppendingPaths:(NSArray *)paths;
- (NSUInteger)completePathIntoString:(NSString **)outputName caseSensitive:(BOOL)flag matchesIntoArray:(NSArray **)outputArray filterTypes:(NSArray *)filterTypes;
- (__strong const char *)fileSystemRepresentation;
- (BOOL)getFileSystemRepresentation:(char *)cname maxLength:(NSUInteger)max;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment