Commit Graph

22 Commits

Author SHA1 Message Date
macdonst 0c3a8fb9f7 File API: System and Directories
http://www.w3.org/TR/file-system-api/

User can retrieve PERSISTENT and TEMPORARY file systems, list their
contents, and manipulate files and directories within them.

Modify existing FileWriter implementation
-----------------------------------------

  - Change the way user creates a FileWriter.  User must either pass a
    File object to the FileWriter constructor, or use the
    FileEntry.createWriter() method.

  - Drop support for the 'filePath' and 'append' parameters in the
    FileWriter constructor.  The file path is determined from either the
    File object passed to the FileWriter constructor, or the FileEntry
    object used to create the FileWriter.  To append to a file, use the
    FileWriter object's seek method:

    // writer is a FileWriter object
    // seek to length of file to append
    writer.seek(writer.length);

Replace FileMgr JavaScript APIs not specified in any File API spec
------------------------------------------------------------------

  - Remove navigator.fileMgr.createDirectory(dirName) function.  To
    create a directory, use the DirectoryEntry.getDirectory() method,
    which is part of the File API: Directories and System spec.  Set
    the Flags.create to 'true':

    // directory is a DirectoryEntry object
    directory.getDirectory(path, {create:true}, successCB, failCB);

  - Remove navigator.fileMgr.getRootPaths() function.  To retrieve the
    root file systems, use the window.requestFileSystem() function,
    which is part of the File API: Directories and System spec.

  - Remove navigator.fileMgr.getFileProperties(fileName) function.  To
    get the properties of a file, use the FileEntry.file() method, which
    is part of the File API: Directories and System spec.

  - Remove navigator.fileMgr.deleteFile(fileName) function.  To delete a
    file, use the Entry.remove() method, which is part of the File API:
    Directories and System spec.

  - Remove navigator.fileMgr.deleteDirectory(dirName) function.  To
    delete a directory, use the Entry.remove() (if it is empty), or
    DirectoryEntry.removeRecursively() methods, which are part of the
    File API: Directories and System spec.

Clean up existing FileManager native code.  Move some functionality to
file utility class.
2011-03-05 04:26:31 +08:00
macdonst f71d9deb5e Fixing mimetypes for content:// Uri's. 2011-01-05 02:45:04 +08:00
macdonst 43c72e684c Setting content type properly in readAsDataURL 2010-12-23 00:26:38 +08:00
macdonst 8bad4eb7eb Fixing issue where Camera returned a content URI that File Reader could not read 2010-12-17 05:08:45 +08:00
macdonst 50b435c4d1 Following File API spec. 2010-11-25 03:11:43 +08:00
macdonst 5dcac6d7fe Fixing issue in File Reader/Writer when newlines in file 2010-11-16 13:30:18 -05:00
macdonst 2e5d6f5b74 Adding truncate to FileWriter 2010-10-28 22:17:20 -04:00
Bryce Curtis 577284b960 Remove unneeded debug log statements. 2010-10-28 16:28:24 -05:00
Bryce Curtis de23753204 Update license and copyright notices in each source file. PhoneGap is licensed under modified BSD and MIT (2008). 2010-10-18 15:31:16 -05:00
Bryce Curtis 9adb85a64b Add callbackId to Plugin.execute() so result can be sent back when overlapping calls to same plugin occur. 2010-10-06 12:56:34 -05:00
Bryce Curtis 68146329b9 Add IPlugin interface and change Plugin to be abstract class. Plugins can either implement IPlugin or extend Plugin. 2010-10-06 12:56:34 -05:00
Bryce Curtis 0ed522481f Read and write operations are async. 2010-09-17 16:05:05 -05:00
Bryce Curtis 00dc18a488 Convert FileUtils to plugin architecture. 2010-09-17 15:41:48 -05:00
Bryce Curtis 9e931cc3f6 Change to use Commands and CommandManager. 2010-09-07 10:39:55 -05:00
Bryce Curtis 40997b4cb8 Update classes to use module, and make constructors consistent. 2010-09-03 17:24:55 -05:00
Dave Johnson 0c52ed44a0 changed FileUtils to public for testing purposes. added updategap that can updated a project with the latest phonegap jar and js 2010-08-24 18:58:40 -07:00
Dave Johnson ab4ca5ec8b changed 'deviceReady' to 'deviceready' in index.html. fixed up the file utils a bit so that they sort of work. 2010-07-15 16:59:11 -07:00
Brock Whitten f93c2badcc Minor change for synchronous write. This seems like a bad idea. 2010-02-25 10:09:58 -08:00
Brock Whitten 9c0259c2c1 Changing File Behaviour to sync with iPhone 2010-02-25 09:46:46 -08:00
Joe Bowser f6e2e129b1 Fixing FileUtils 2009-12-07 14:11:35 -08:00
Joe Bowser 573dffb853 Removing loop from File I/O 2009-12-03 17:07:07 -08:00
Joe Bowser d012235bc2 Initial Move of the Javascript OUT of the shared directory: Android 2009-11-17 10:38:49 -08:00