Ellié Computing Home Page
My Shopping Cart

Your shopping cart is empty

Display Cart

Call us at +1 586 62 ELLIE / +1 586 62 35543 Office Opened
sales@elliecomputing.com - Contact us


FolderDocument.Item object

 

 

Prototype for FolderDocument.Item objects

Syntax

You cannot create a FolderDocument.Item object.
You can retrieve the root item of document this way:

var my_folder_doc;
var item = my_folder_doc.root;

You can get the nth child object under an item this way:

var container_item;
var item = container_item.children[n];

Parameters

none.

Property Of

none.

Implemented In

ECMerge 2.1

Description

FolderDocument.Item objects represents items which are viewed in folder document tree. They let you obtain information about the comparison and the compared items.

Properties

Property Description
action_class Item Resolution Class string. Describes in which major comparison case the item lies (added, removed, identical, absent...)
any_folder Boolean. Read-only. True if any of the compared objects is a folder (as opposed to files)
children FolderDocument.Items object. Let you retrieve items logically contained by the compared folders
complete Boolean. Read-only. True if the requests launched to list the parent objects all returned their results and the metadata for this item are fully filled
error_state String. Read-only. Gives a description of the current state of this item.
ignored Boolean. Read-only. True if this item is ignored (excluded from comparison and view), for whichever reason
ignored_by_user Boolean. True if the user specifically want to ignore this item.
marked Boolean. True if this item is marked.
metadata VFS.Metadata collection, indexed by Side String. Read-Only. Gives metadata about the compared objects (presence, rights, size...)
name String. Name for this object, identifying it amongst its silblings.
summary_computed Boolean. Read-only. True when the comparison summary for this item was computed

 

Methods

are_objects_identical
get_url

Examples

Example 1.

Enumerate the names of the children of the root item:

var folder_doc = current_frame.coordinator.document;
var root_item_children = folder_doc.root.children;
root_item_children.fill ();
for (var idxc in root_item_children)
    log (root_item_children[idxc].name);

See Also 

FolderDocument object, FolderDocument.Items object, VFS.Metadata object, Item Resolution Class string

Method are_objects_identical

Syntax

function are_objects_identical (side1, side2 )
returns a Boolean

Parameters

side1, side2. Side strings. Indicates which objects must be compared within the item.

Method Of

FolderDocument.Item object.

Implemented In

ECMerge 2.1

Description

Returns true if the objects in the given sides are identical. Identity is computed locally. It means that comparing two folders for identity will just check if they both are there. To get recursive information, call FolderDocument.get_statistics and study the returned Statistics object.

Note that if the property 'summary_computed' is false, this method throws an Error exception. Use FolderDocument.compare to ensure the summary is well computed.

Examples

Example 1.

Compares the full document, then tells whether the object compared by the root item are identical:

var folder_doc = current_frame.coordinator.document;
folder_doc.compare (new FolderDocument.Selection(folder_doc));
alert (folder_doc.root.are_objects_identical ("left", "right"));

See Also 

 FolderDocument.Item object, Side strings, FolderDocument.compare method, FolderDocument.get_statistics method

Method get_url

Syntax

 function get_url (side)

Parameters

side. Side string. Indicates from which object the URL is queried

Method Of

FolderDocument.Item object.

Implemented In

ECMerge 2.1

Description

Returns the URL at which the object in given side can be found.

Examples

Example 1.

Displays the URL of the root item result side:

var folder_doc = current_frame.coordinator.document;
alert (folder_doc.root.get_url ("result"));

See Also 

 FolderDocument.Item object