MFileEntry

From HTML5 Builder
Jump to: navigation, search

MFileEntry is a file on device’s file system.

Functions

These are JavaScript functions you can call when you use this component in a screen.
Note: Replace ComponentName with the actual name of the component, that is, the value of its Name property. For example: MFileEntry1.
ComponentNameGetMetadata
Looks up metadata about file. It triggers OnGetMetadata event, or OnGetMetadataError if an error occurs.
ComponentNameMoveTo
Move file to a new location. When you call it, pass it the location of file’s new parent folder, and (optionally) file’s new name. It triggers OnMoveTo event, or OnMoveToError if an error occurs.
ComponentNameCopyTo
Copy file somewhere. When you call it, pass it the location of file’s new copy parent folder, and (optionally) file’s new copy name. It triggers OnCopyTo event, or OnCopyToError if an error occurs.
ComponentNameRemove
Removes file. It triggers OnRemove event, or OnRemoveError if an error occurs.
ComponentNameGetParent
Gets a DirectoryEntry object for file’s parent directory. It triggers OnGetParent event, or OnGetParentError if an error occurs.
ComponentNameFile
Returns a File object for the file represented by ComponentName. It triggers OnFile event, or OnFileError if an error occurs.
ComponentNameCreateWriter
Returns a FileWriter object for the file represented by ComponentName. It triggers OnCreateWriter event, or OnCreateWriterError if an error occurs.

Events

These are JavaScript MFileEntry events you can associate to JavaScript functions.

OnCopyTo
This event gets triggered when ComponentNameCopyTo successfully copies the file to a new location.
OnCopyToError
This event gets triggered when an error occurs after calling ComponentNameCopyTo. Its only parameter is a ContactError object.
OnCreateWriter
This event gets triggered when ComponentNameCreateWriter successfully returns a FileWriter object, which is its only parameter.
OnCreateWriterError
This event gets triggered when an error occurs after calling ComponentNameCreateWriter. Its only parameter is a ContactError object.
OnFile
This event gets triggered when ComponentNameFile successfully returns a File object, which is its only parameter.
OnFileError
This event gets triggered when an error occurs after calling ComponentNameFile. Its only parameter is a ContactError object.
OnGetMetadata
This event gets triggered when ComponentNameGetMetadata successfully returns a Metadata object, which is its only parameter.
OnGetMetadataError
This event gets triggered when an error occurs after calling ComponentNameGetMetadata. Its only parameter is a ContactError object.
OnGetParent
This event gets triggered when ComponentNameGetParent successfully returns a DirectoryEntry object, which is its only parameter.
OnGetParentError
This event gets triggered when an error occurs after calling ComponentNameGetParent. Its only parameter is a ContactError object.
OnMoveTo
This event gets triggered when ComponentNameMoveTo successfully moves the file to its new location.
OnMoveToError
This event gets triggered when an error occurs after calling ComponentNameMoveTo. Its only parameter is a ContactError object.
OnRemove
This event gets triggered when ComponentNameRemove successfully removes the file.
OnRemoveError
This event gets triggered when an error occurs after calling ComponentNameRemove. Its only parameter is a ContactError object.

See Also

Personal tools