Mercurial > projects > dstep
diff dstep/foundation/NSPathUtilities.d @ 16:19885b43130e
Huge update, the bridge actually works now
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sun, 03 Jan 2010 22:06:11 +0100 |
parents | 89f3c3ef1fd2 |
children |
line wrap: on
line diff
--- a/dstep/foundation/NSPathUtilities.d Mon Aug 03 15:31:48 2009 +0200 +++ b/dstep/foundation/NSPathUtilities.d Sun Jan 03 22:06:11 2010 +0100 @@ -7,9 +7,12 @@ module dstep.foundation.NSPathUtilities; import dstep.foundation.NSArray; +import dstep.foundation.NSObjCRuntime; import dstep.foundation.NSString; import dstep.objc.bridge.Bridge; -import dstep.objc.objc : id; +import dstep.objc.objc; + +import bindings = dstep.foundation.NSPathUtilities_bindings; alias NSUInteger NSSearchPathDirectory; alias NSUInteger NSSearchPathDomainMask; @@ -43,11 +46,11 @@ NSAllDomainsMask = 0x0ffff } -template TNSStringPathExtensions () -{ +const TNSStringPathExtensions = ` + static NSString pathWithComponents (NSArray components) { - return invokeObjcSelfClass!(NSString, "pathWithComponents:", NSArray)(components); + return invokeObjcSuperClass!(NSString, "pathWithComponents:", NSArray)(components); } NSArray pathComponents () @@ -129,15 +132,15 @@ { return invokeObjcSelf!(bool, "getFileSystemRepresentation:maxLength:", char*, NSUInteger)(cname, max); } -} +`; -template TNSArrayPathExtensions () -{ +const TNSArrayPathExtensions = ` + NSArray pathsMatchingExtensions (NSArray filterTypes) { return invokeObjcSelf!(NSArray, "pathsMatchingExtensions:", NSArray)(filterTypes); } -} +`; NSString NSUserName () {