Previous | Index | Next |
URL and File related methods
itemsIn:recursive:skipHidden:skipInsidePackages:asPaths:
Enumerate the directory (passed as an alias, file, HFS path, POSIX path or NSURL), and return an array of either paths or NSURLs of the contained folders, files and packages.
+ (NSArray *)itemsIn:(id)urlFileOrPath recursive:(BOOL)recurseFlag skipHidden:(BOOL)hiddenFlag skipInsidePackages:(BOOL)skipInPackagesFlag asPaths:(BOOL)pathsFlag
urlFileOrPath = alias, file, HFS path, POSIX path or NSURL
recurseFlag = whether to recurse through any folders
hiddenFlag = whether to ignore hidden items
skipInPackagesFlag = whether to include items within file packages
pathsFlag = whether to return POSIX paths or NSURLs
An array or list of POSIX paths or URLs
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 itemsIn:urlFileOrPath recursive:true skipHidden:true skipInsidePackages:true asPaths:true
ASify from theResult
--> <recursive list of POSIX paths of files on Desktop>
theResult as list
--> <recursive list of POSIX paths of files on Desktop>
set theResult to current application's SMSForder's itemsIn:urlFileOrPath recursive:true skipHidden:true skipInsidePackages:true asPaths:false
ASify from theResult
--> <recursive list of file references of files and folders on Desktop>
theResult as list -- 10.11 only
--> <recursive list of file references of files and folders on Desktop>
theResult as list -- 10.9 and 10.10
--> <recursive list of NSURLs of files and folders on Desktop>