Previous | Index | Next |
URL and File related methods
foldersIn:recursive:asPaths:
As foldersIn:recursive:skipHidden:skipInsidePackages:asPaths:, but always skipping hidden folders and folders inside packages.
+ (NSArray *)foldersIn:(id)urlFileOrPath recursive:(BOOL)recurseFlag asPaths:(BOOL)pathsFlag
urlFileOrPath = alias, file, HFS path, POSIX path or NSURL
recurseFlag = whether to recurse through any folders
pathsFlag = whether to return POSIX paths or NSURLs
An array or list of POSIX paths or URLs of folders (excluding packages)
Version 1.3.0
use scripting additions
use framework "Foundation"
use script "BridgePlus"
load framework
set urlFileOrPath to "~/Desktop"
set theResult to current application's SMSForder's foldersIn:urlFileOrPath recursive:true asPaths:true
ASify from theResult
--> <recursive list of POSIX paths of folders on Desktop>
theResult as list
--> <recursive list of POSIX paths of files on Desktop>
set theResult to current application's SMSForder's foldersIn:urlFileOrPath recursive:true asPaths:false
ASify from theResult
--> <recursive list of file references of folders on Desktop>
theResult as list -- 10.11 only
--> <recursive list of file references of folders on Desktop>
theResult as list -- 10.9 and 10.10
--> <recursive list of NSURLs of folders on Desktop>