Previous Index Next

BridgePlus.framework, SMSForder Class Methods

Category

URL and File related methods

Method

itemsIn:recursive:asPaths:

Summary

As itemsIn:recursive:skipHidden:skipInsidePackages:asPaths:, but always skipping hidden files and files inside packages.

Signature

+ (NSArray *)itemsIn:(id)urlFileOrPath recursive:(BOOL)recurseFlag asPaths:(BOOL)pathsFlag

Parameters

urlFileOrPath = alias, file, HFS path, POSIX path or NSURL

recurseFlag = whether to recurse through any folders

pathsFlag = whether to return POSIX paths or NSURLs

Result

An array or list of POSIX paths or URLs of files and folders

Availability

Version 1.3.0

Notes

 

Sample

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 asPaths:true

ASify from theResult

--> <recursive list of POSIX paths of files and folders on Desktop>

theResult as list

--> <recursive list of POSIX paths of files and folders on Desktop>

set theResult to current application's SMSForder's itemsIn:urlFileOrPath recursive: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>


Click here to open script in a script editor