|
FolderDocument.Selection object
Prototype for FolderDocument.Selection objects. Is a kind of Document.Selection object. SyntaxTo create an empty folder selection: var folder_doc; To create a folder selection containing all the items in the folder document (include_all=true): var folder_doc; Parametersfolder_doc. FolderDocument
object. Folder document for which items are selected. Property Ofnone. Implemented InECMerge 2.1 DescriptionFolderDocument.Selection objects describe which items are selected in folder document. The items which are selected will be those on which operations occur. These selections are often used to limit the set of items which are compared, modified, copied, deleted... Propertiesnone specific. MethodsExamplesExample 1.To create a folder selection containing all the items in the folder document: var folder_doc; See Also
Method add / removeSyntaxfunction add (item, recursively) Parametersitem. FolderDocument.Item
object. Item to add or remove Method OfFolderDocument.Selection object. Implemented InECMerge 2.1 Descriptionadd adds item (or sub-tree rooted at item) to the
selection. These two methods are the base operations to constitute an arbitrary selection. ExamplesExample 1.Create a selection and add the items under the root matching a regular expression for executable files: var folder_doc; See Also
Method filter / for_eachSyntaxfunction filter ( f ) Parametersf. Function object. f is called for each item. It must return a Boolean and accepts one argument, a FolderDocument.Item object. Method OfFolderDocument.Selection object. Implemented InECMerge 2.1 Descriptionfilter and for_each both enumerate the items in the selection and call f for each enumerated elements. f must return a Boolean. If this boolean is true, both functions enter the enumerated item and continue enumerating normally. When f returns false, filter will remove the enumerated item whereas for_each does nothing but not entering this item. ExamplesExample 1.Checks whether current document is a folder document, uses the current selection, removes one item out of two from the selection, and set the result as the current selection: var currentdoc =
current_frame.coordinator.document; See Also
|
|