source: releases/Pester/1.1a2/Source/NDAppleScript/NSURL+NDCarbonUtilities.m@ 290

Last change on this file since 290 was 35, checked in by Nicholas Riley, 22 years ago

Nathan Day's NDAppleScript and related classes, somewhat modified.
Still need to commit Nathan's changes to NDResourceFork.

File size: 796 bytes
Line 
1/*
2 * NSURL+NDCarbonUtilities.m category
3 * AppleScriptObjectProject
4 *
5 * Created by nathan on Wed Dec 05 2001.
6 * Copyright (c) 2001 __CompanyName__. All rights reserved.
7 */
8
9#import "NSURL+NDCarbonUtilities.h"
10
11@implementation NSURL (NDCarbonUtilities)
12
13+ (NSURL *)URLWithFSRef:(const FSRef *)aFsRef
14{
15 return [(NSURL *)CFURLCreateFromFSRef( kCFAllocatorDefault, aFsRef ) autorelease];
16}
17
18- (NSURL *)URLByDeletingLastPathComponent
19{
20 return [(NSURL *)CFURLCreateCopyDeletingLastPathComponent( kCFAllocatorDefault, (CFURLRef)self) autorelease];
21}
22
23- (BOOL)getFSRef:(FSRef *)aFsRef
24{
25 return CFURLGetFSRef( (CFURLRef)self, aFsRef );
26}
27
28- (NSString *)fileSystemPathHFSStyle
29{
30 return [(NSString *)CFURLCopyFileSystemPath((CFURLRef)self, kCFURLHFSPathStyle) autorelease];
31}
32
33@end
Note: See TracBrowser for help on using the repository browser.