-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding CWPathUtilities & doing some refactoring
- Loading branch information
Showing
7 changed files
with
62 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,16 @@ | |||
// | |||
// CWPathUtilities.h | |||
// Zangetsu | |||
// | |||
// Created by Colin Wheeler on 12/20/10. | |||
// Copyright 2010 __MyCompanyName__. All rights reserved. | |||
// | |||
|
|||
#import <Cocoa/Cocoa.h> | |||
|
|||
#define CWFullPathFromTildeString(_X_) [_X_ stringByExpandingTildeInPath] | |||
|
|||
@interface CWPathUtilities : NSObject {} | |||
+(NSString *)applicationSupportFolder; | |||
+(NSString *)pathByAppendingAppSupportFolderWithPath:(NSString *)path; | |||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,30 @@ | |||
// | |||
// CWPathUtilities.m | |||
// Zangetsu | |||
// | |||
// Created by Colin Wheeler on 12/20/10. | |||
// Copyright 2010 __MyCompanyName__. All rights reserved. | |||
// | |||
|
|||
#import "CWPathUtilities.h" | |||
|
|||
|
|||
@implementation CWPathUtilities | |||
|
|||
+(NSString *)applicationSupportFolder | |||
{ | |||
NSString *_path = [NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES) cw_firstObject]; | |||
|
|||
return _path; | |||
} | |||
|
|||
+(NSString *)pathByAppendingAppSupportFolderWithPath:(NSString *)path | |||
{ | |||
NSString *_appSupportPath = [CWPathUtilities applicationSupportFolder]; | |||
|
|||
NSString *_result = [NSString stringWithFormat:@"%@/%@",_appSupportPath,path]; | |||
|
|||
return _result; | |||
} | |||
|
|||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters