incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject docs commit: Fixed CB-670 - Create doc for new FileEntry.setMetadata function
Date Tue, 08 May 2012 22:48:33 GMT
Updated Branches:
  refs/heads/master 1f3131582 -> 833684cbc


Fixed CB-670 - Create doc for new FileEntry.setMetadata function


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/commit/833684cb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/tree/833684cb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/diff/833684cb

Branch: refs/heads/master
Commit: 833684cbc9be07a5282923744f523cf111fbc9a1
Parents: 1f31315
Author: shazron <shazron@gmail.com>
Authored: Tue May 8 15:48:23 2012 -0700
Committer: shazron <shazron@gmail.com>
Committed: Tue May 8 15:48:23 2012 -0700

----------------------------------------------------------------------
 .../cordova/file/directoryentry/directoryentry.md  |   30 ++++++++++++++
 docs/en/edge/cordova/file/fileentry/fileentry.md   |   31 +++++++++++++++
 2 files changed, 61 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/833684cb/docs/en/edge/cordova/file/directoryentry/directoryentry.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/file/directoryentry/directoryentry.md b/docs/en/edge/cordova/file/directoryentry/directoryentry.md
index 7b80bf1..90b4143 100644
--- a/docs/en/edge/cordova/file/directoryentry/directoryentry.md
+++ b/docs/en/edge/cordova/file/directoryentry/directoryentry.md
@@ -40,6 +40,7 @@ Methods
 The following methods can be invoked on a DirectoryEntry object:
 
 - __getMetadata__: Look up metadata about a directory. 
+- __setMetadata__: Set metadata on a directory.
 - __moveTo__: Move a directory to a different location on the file system.
 - __copyTo__: Copy a directory to a different location on the file system.
 - __toURI__: Return a URI that can be used to locate a directory.
@@ -83,6 +84,35 @@ __Quick Example__
     // Request the metadata object for this entry
     entry.getMetadata(success, fail);	
 
+setMetadata
+----------------
+
+Set metadata on a directory. 
+**Only works on iOS currently** - this will set the extended attributes of a directory.
+
+__Parameters:__
+
+- __successCallback__ - A callback that is called when the metadata was successfully set.
_(Function)_
+- __errorCallback__ - A callback that is called when the metadata was not successfully set.
_(Function)_
+- __metadataObject__ - An object that contains the metadata keys and values. _(Object)_
+
+
+__Quick Example__
+
+    function success() {
+        console.log("The metadata was successfully set.");
+    }
+
+    function fail() {
+        alert("There was an error in setting the metadata");
+    }
+
+    // Set the metadata
+    entry.setMetadata(success, fail, { "com.apple.MobileBackup", 1});	
+__iOS Quirk__
+
+- only the **"com.apple.MobileBackup"** extended attribute is supported. Set the value to
**1** to NOT enable the directory to be backed up by iCloud. Set the value to **0** to re-enable
the directory to be backed up by iCloud.
+
 
 moveTo
 ------

http://git-wip-us.apache.org/repos/asf/incubator-cordova-docs/blob/833684cb/docs/en/edge/cordova/file/fileentry/fileentry.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/file/fileentry/fileentry.md b/docs/en/edge/cordova/file/fileentry/fileentry.md
index cde59bf..7da7de2 100644
--- a/docs/en/edge/cordova/file/fileentry/fileentry.md
+++ b/docs/en/edge/cordova/file/fileentry/fileentry.md
@@ -39,6 +39,7 @@ Methods
 -------
 
 - __getMetadata__: Look up metadata about a file. 
+- __setMetadata__: Set metadata on a file.
 - __moveTo__: Move a file to a different location on the file system.
 - __copyTo__: Copy a file to a different location on the file system.
 - __toURI__: Return a URI that can be used to locate a file.
@@ -82,6 +83,36 @@ __Quick Example__
     entry.getMetadata(success, fail);	
 
 
+setMetadata
+----------------
+
+Set metadata on a file. 
+**Only works on iOS currently** - this will set the extended attributes of a file.
+
+__Parameters:__
+
+- __successCallback__ - A callback that is called when the metadata was successfully set.
_(Function)_
+- __errorCallback__ - A callback that is called when the metadata was not successfully set.
_(Function)_
+- __metadataObject__ - An object that contains the metadata keys and values. _(Object)_
+
+
+__Quick Example__
+
+    function success() {
+        console.log("The metadata was successfully set.");
+    }
+
+    function fail() {
+        alert("There was an error in setting the metadata");
+    }
+
+    // Set the metadata
+    entry.setMetadata(success, fail, { "com.apple.MobileBackup", 1});	
+__iOS Quirk__
+
+- only the **"com.apple.MobileBackup"** extended attribute is supported. Set the value to
**1** to NOT enable the file to be backed up by iCloud. Set the value to **0** to re-enable
the file to be backed up by iCloud.
+
+
 moveTo
 ------
 


Mime
View raw message