|
FolderDocument object
Prototype for FolderDocument objects SyntaxTo create a folder document:
var parameters = new Document.Parameters ( );
var doc = new Document (parameters, "view"); Parametersnone. Property Ofnone. Implemented InECMerge 2.1 DescriptionFolderDocument objects handle folder browsing or folder comparisons. Properties
Properties of information
Methods
compare
ExamplesExample 1.Creates a folder document to compare two directories, view it and display the statistics box:
var parameters = new Document.Parameters ( );
var doc = new Document (parameters, "view");
See Also
Method compare / compare_content / recompare / reset_written_stateSyntaxfunction compare (selection)
Parametersselection. FolderDocument.Selection object. Selection of items to compare Method OfFolderDocument object Implemented InECMerge 2.1 Descriptioncompare and compare_content make the folder document compares the selected items. compare_content always compares the content of the items (when possible). compare follows the rules established in the Folder Comparisons panel of the Document options (i.e. "typed.folders.comparison" name space of the OptionsSet object). recompare invalidates the result of previous comparisons for selected items, it does not run comparison at once. reset_written_state removes the Written marker. Written items are ignored by the merge method. ExamplesExample 1.Compares the currently selected elements: current_frame.coordinator.document.compare (current_frame.coordinator.current_view.clone_selection());
Method generic_copySyntaxfunction generic_copy (selection, source, target, mode, questions_answers) Parametersselection.
FolderDocument.Selection object.
Selection of items to act on
Method OfFolderDocument object Implemented InECMerge 2.1 DescriptionRealizes the same operation as Generic Copy Dialog Box, without user interface. Note the presence of the "simulate" question, in questions_answers parameter which allow you to only simulate the generic copy operation, and as such, only generate the log corresponding to what would be done (assuming everything is successful). ExamplesExample 1.Cheks whether the document is folder document, then proposes various actions in choose( ) box and act:
var currentdoc = current_frame.coordinator.document;
See Also
Method get_bookmarks_selectionSyntaxfunction get_bookmarks_selection( )
Parametersnone. Method OfFolderDocument object Implemented InECMerge 2.1 DescriptionReturns a selection built of the bookmarked items. This method allows you to act on bookmarked items, as easily as you can on selected items. ExamplesExample 1.Compares contents of the bookmarked items:
var currentdoc =
current_frame.coordinator.document;
See Also
Method get_itemSyntaxfunction get_item (url, side)
Parametersurl.
URL object
or String. URL leading to the object which is compared in the
wanted folder item
Method OfFolderDocument object Implemented InECMerge 2.1 Descriptionget_item searches for the comparison item in which the object pointed to by url appears. ExamplesExample 1.Finds an item which has the object pointed to by "c:\\temp" in its ancestor side:
var currentdoc =
current_frame.coordinator.document;
See Also
Method mergeSyntaxfunction merge (selection, questions_answers) Parametersselection.
FolderDocument.Selection object.
Selection of items to act on
Method OfFolderDocument object Implemented InECMerge 2.1 DescriptionRealizes the 'write merge results' operation as defined in Ellié Computing Merge: it takes each item, do the necessary comparisons, deduce the appropriate action from the comparison class and the settings found in the current document OptionsSet, then it executes this action. merge will skip errors and unresolved items by default. You can change these baheviour with questions_answers parameters. ExamplesExample 1.Merges the selected items:
var currentdoc =
current_frame.coordinator.document;
See Also
Method removeSyntaxfunction remove (selection, side, questions_answers) Parametersselection.
FolderDocument.Selection object.
Selection of items to act on
Method OfFolderDocument object Implemented InECMerge 2.1 DescriptionDeletes the file system objects in given side, for each item of the selection. Note the presence of the "simulate" question, in questions_answers parameter which allow you to only simulate the deletion operation, and as such, only generate the log corresponding to what would be done (assuming everything is successful). ExamplesExample 1.Tests whether current document is a folder, then asks if the user really wants to delete, then ask if confirmations are necessary, and deleted currently selected items:
var currentdoc = current_frame.coordinator.document;
See Also
Method resolveSyntaxfunction resolve (selection, rules_set, undoable) Parametersselection.
FolderDocument.Selection object.
Selection of items to act on
Method OfFolderDocument object Implemented InECMerge 2.1 DescriptionResolves the selected items with the given resolution rules. ExamplesExample 1.Tests whether current document is a folder, then let the user choose an action, and finally resolve currently selected item with it:
var currentdoc = current_frame.coordinator.document;
var sel =
current_frame.coordinator.current_view.clone_selection();
See Also
|
|||||||||||||