WWW-www.enlightenment.org pushed a commit to branch master.

http://git.enlightenment.org/website/www-content.git/commit/?id=5fed8a97ffccdc4465e1a6c35932dcf2a82e7fe2

commit 5fed8a97ffccdc4465e1a6c35932dcf2a82e7fe2
Author: Lauro Moura <lauromo...@expertisesolutions.com.br>
Date:   Fri Dec 11 11:10:44 2015 -0800

    Wiki page file changed with summary [] by Lauro Moura
---
 pages/api/javascript/ecore/file.txt | 73 +++++++++++++++++++++++--------------
 1 file changed, 45 insertions(+), 28 deletions(-)

diff --git a/pages/api/javascript/ecore/file.txt 
b/pages/api/javascript/ecore/file.txt
index b1aa6b4..75ac5ef 100644
--- a/pages/api/javascript/ecore/file.txt
+++ b/pages/api/javascript/ecore/file.txt
@@ -4,7 +4,7 @@
 
 **DRAFT**
 
-The File module provides a large number of functions to work with files, 
directories and downloads.
+The File module provides a large number of functions to work with files, 
directories, and downloads.
 
 ==== Constants ====
 
@@ -61,7 +61,7 @@ Return type
    * object - An object wrapping the new monitor.
    * null - If it was not possible to create the monitor.
 
-This function monitors path. If path is ''null'', or is an empty string, or 
none of the notify methods (Inotify, Windows notification or polling) is 
available, or if the path does not exist the function returns ''null''. 
Otherwise, it returns a newly allocated ''Monitor'' object and the monitoring 
begins. When one of the ''efl.Ecore.File.EVENT_*'' events is notified, the 
callback is called. Call ''del()'' on the monitor object to stop the monitoring.
+This function monitors path. If the path is ''null'', or is an empty string, 
or none of the notify methods (Inotify, Windows notification or polling) is 
available, or if the path does not exist the function returns ''null''. 
Otherwise, it returns a newly allocated ''Monitor'' object and the monitoring 
begins. When one of the ''efl.Ecore.File.EVENT_*'' events are notified, the 
callback is called. Call ''del()'' on the monitor object to stop the monitoring.
 
 === availableDownloadProtocol(protocol) ===
 
@@ -81,90 +81,107 @@ Return type
 
 This function returns ''true'' if protocol is supported, ''false'' otherwise. 
protocol can be ''http://'', ''ftp://'' or ''file:/\/ ''. Ecore.File must be 
compiled with CURL to handle http and ftp protocols.
 
-=== canExec() ===
+=== canExec(file) ===
 
 Syntax
 
 <code javascript>
+var canExec = efl.Ecore.File.canExec(file)
 </code>
 
 Parameters
 
-   * parameter
+   * file - The name of the file.
 
-Return type
+Return value
 
-   * return type
+   * boolean - ''true'' if the file can be executed, ''false'' otherwise.
 
-Lorem ipsum...
+This function returns ''true'' if file can be executed, ''false'' otherwise.
 
-=== canRead() ===
+=== canRead(file) ===
 
 Syntax
 
 <code javascript>
+var canRead = efl.Ecore.File.canRead(file)
 </code>
 
 Parameters
 
-   * parameter
+   * file - The name of the file.
 
-Return type
+Return value
 
-   * return type
+   * boolean - ''true'' if the file is readable, ''false'' otherwise.
 
-Lorem ipsum...
+This function returns ''true'' if file can be read, ''false'' otherwise.
 
-=== canWrite() ===
+=== canWrite(file) ===
 
 Syntax
 
 <code javascript>
+var canWrite = efl.Ecore.File.canWrite(file)
 </code>
 
 Parameters
 
-   * parameter
+   * file - The name of the file.
 
-Return type
+Return value
 
-   * return type
+   * boolean - ''true'' if the file is writable, ''false'' otherwise.
 
-Lorem ipsum...
+This function returns ''true'' if file can be written, ''false'' otherwise.
 
-=== cp() ===
+=== cp(src, dst) ===
 
 Syntax
 
 <code javascript>
+efl.Ecore.File.cp(src, dst)
 </code>
 
 Parameters
+   * src - The name of the source file.
+   * dst - The name of the destination file.
 
-   * parameter
-
-Return type
+Return value
 
-   * return type
+   * boolean - ''true'' on success, ''false'' otherwise.
 
-Lorem ipsum...
+This function copies src to dst. If the absolute path name of src and dst can 
not be computed, or if they are equal, or if the copy fails, the function 
returns ''false'', otherwise it returns ''true''.
 
-=== download() ===
+=== efl.Ecore.File.download(url, dst, completion_cb, progress_cb [, headers]) 
===
 
 Syntax
 
 <code javascript>
+function completion_cb(file, status) { ... };
+function progress_cb(file, dltotal, dlnow, ultotal, ulnow) { ... };
+efl.Ecore.File.download(url, dst, completion_cb, progress_cb);
+
+headers = {...};
+efl.Ecore.File.download(url, dst, completion_cb, progress_cb, headers);
 </code>
 
 Parameters
+   * url - The complete url to download.
+   * dst - The local file to save the downloaded to.
+   * completion_cb - A callback called on download complete.
+   * progress_cb - A callback called during the download operation.
+   * headers - Optional object with set of headers to the download operation.
 
-   * parameter
+Return value
 
-Return type
+   * boolean - ''true'' if the download start or ''false'' on failure.
 
-   * return type
+This function starts the download of the URL ''url'' and saves it to ''dst''. 
''url'' must provide the protocol, including 'http://', 'ftp://' or 'file:/\/'. 
''efl.Ecore.File'' must be compiled with CURL to download using http and ftp 
protocols. If ''dst'' is ill-formed, or if it already exists, the function 
returns ''false''. When the download is complete, the callback 
''completion_cb'' is called and data is passed to it. The status parameter of 
completion_cb will be filled with the sta [...]
 
-Lorem ipsum...
+The optional ''headers'' parameters contain additional headers to control the 
download operation.
+
+This function returns ''true'' if the download starts, ''false'' otherwise.
 
 === environmentTmp() ===
 

-- 


Reply via email to