Programmer's Guide > Programming and Scripting Techniques > Events > Event Types > CMSSessionFileEvent Module
  
CMSSessionFileEvent Module
The CMSSessionFileEvent module has the following event types:
CMSSessionGetFile
This event occurs before the content of a repository object is downloaded to a local disk file. This event is similar to the getfile ACL callback associated with the sess_add_callback function.
This event type is cancelable. If an event listener calls the preventDefault method, the object will not be downloaded. The event handler can perform a customized download itself and then cancel the default download by calling preventDefault and setting result to specify a local disk file containing the object content.
* 
Setting result without calling preventDefault will cause the result to be ignored and the default processing to proceed.
The following module properties provide the context information for this event:
logicalId
Represents the object whose content is desired.
notation
Represents an adapter-specific format specification.
Bubbles: Yes
Cancelable: Yes
Context Info: logicalId, notation
CMSSessionPostGetFile
This event occurs after an object's content has been downloaded. As such, it is not cancelable. There is no equivalent ACL hook for this event.
The following module properties provide the context information for this event:
logicalId
Represents the object whose content is desired.
notation
Represents an adapter-specific format specification.
localPath
Represents the local disk file containing the object content.
Bubbles: Yes
Cancelable: No
Context Info: logicalId, notation, localPath
CMSSessionPutFile
This event occurs before a new repository object is created from the contents of a local file or other resource. This event is similar to the putfile ACL callback associated with the sess_add_callback function.
This event type is cancelable. If an event listener calls the preventDefault method, the object will not be created. The event handler can perform a customized creation itself and then cancel the default creation by calling preventDefault and setting result to specify the logical id of the new object.
* 
Setting result without calling preventDefault will cause the result to be ignored and the default processing to proceed.
The following module properties provide the context information for this event:
localPath
Represents the local resource whose content will go into the new object.
notation
Represents an adapter-specific format specification.
objectName
Represents the name of the new object.
folderLogicalId
Represents the parent folder of the new object.
Bubbles: Yes
Cancelable: Yes
Context Info: localPath, notation, objectName, folderLogicalId
CMSSessionPostPutFile
This event occurs after the new object has been created with the contents of a local resource. As such, it is not cancelable. There is no equivalent ACL hook for this event.
The following module properties provide the context information for this event:
localPath
Represents the local resource whose content went into the new object.
notation
Represents an adapter-specific format specification.
logicalId
Represents the logical id of the new object.
Bubbles: Yes
Cancelable: No
Context Info: localPath, notation, logicalId