Prototype for FolderDocument.Item objects
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];
none.
none.
ECMerge 2.1
FolderDocument.Item objects represents items which are viewed in folder document tree. They let you obtain information about the comparison and the compared items.
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 |
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);
FolderDocument object, FolderDocument.Items object, VFS.Metadata object, Item Resolution Class string
function are_objects_identical (side1,
side2 )
returns a Boolean
side1, side2. Side strings. Indicates which objects must be compared within the item.
FolderDocument.Item object.
ECMerge 2.1
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.
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"));
FolderDocument.Item object, Side strings, FolderDocument.compare method, FolderDocument.get_statistics method
function get_url (side)
side. Side string. Indicates from which object the URL is queried
FolderDocument.Item object.
ECMerge 2.1
Returns the URL at which the object in given side can be found.
Displays the URL of the root item result side:
var folder_doc =
current_frame.coordinator.document;
alert (folder_doc.root.get_url ("result"));
FolderDocument.Item object