Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 071F811EF9 for ; Tue, 6 May 2014 21:32:54 +0000 (UTC) Received: (qmail 64803 invoked by uid 500); 6 May 2014 20:44:41 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 64670 invoked by uid 500); 6 May 2014 20:44:29 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 64489 invoked by uid 99); 6 May 2014 20:44:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 May 2014 20:44:13 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of agrieve@google.com designates 209.85.219.46 as permitted sender) Received: from [209.85.219.46] (HELO mail-oa0-f46.google.com) (209.85.219.46) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 May 2014 20:44:10 +0000 Received: by mail-oa0-f46.google.com with SMTP id i4so39885oah.33 for ; Tue, 06 May 2014 13:43:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=/ltecz6XR1q5Jffy2AkfBT1lCgzG4pn1z9UU1DQTT+Q=; b=iV2ZmdoilE0fHC2jbsflAfW2MARAzoN1hYhOSTQEzUcVVKfJcN4KsrM97YrUWDaKpK kLObCtqXCViSbp0GDqqON3bgr1mRuIZEUQKi8G7lQIjgv37PyQk/lqIci+YTP6txPPWe 4sSIqEesNvnPHa4A14e4XsegyRJaQFsBQ2k57dFaG6bPEjtime+ocL6ACe9FmhkgjmgH 4kEPxBsI1+a+iLZC9++i9gFhEPKMt43rKvNdOkH36KKNkheOdfRiDP5hzaTmfzFABpld KFKLAOBT5zf2Thy58KKtqtMIit9xUCpKWwY6N/iTVTNg+0hFLVL8At3kIy2DjpuPbnbZ j+KQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=/ltecz6XR1q5Jffy2AkfBT1lCgzG4pn1z9UU1DQTT+Q=; b=e7tr2Q9nXYeUoW2FsEFsUG8wS4d/XBy0LxLvu0sQLhLwAcFx2sLLuZ1AVz4iKOSOw2 p6XTh6vtA+OQ18t5mDZcpMMSQK6WE0cYjRMvzZ8EMwy9L458cwQCswmO7DYh4KSjEJuj DG6YTunC6PKLgm52YPvc9CMOqJh3xtOkVunZY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:content-type; bh=/ltecz6XR1q5Jffy2AkfBT1lCgzG4pn1z9UU1DQTT+Q=; b=HAd9nw+MpjjyanFr9FSsrmPUMldS4Y8zWVTMujXJoy28ttEcQzfGEzxhoCv+wS5QGg 4MQ7DTw70PqkO5tFtXQa8h/3bLe6zeeRSEVUhViXrUcrOhAdTqRPfeRUMQj+q+rcmWoR K3N8Y6gwQPlQByneGyDsXgT7D4B8Glw8qqXIVV6KvLgVvbY1F0KZqmW+RUkdntbgEVvf AfVoFDb/u7Mo61anBTqEa29zo9Pm4uI4dIt7YXfpCkSnHRyIH4a8FG7HM0A4kOMtkNpj lxh13wwbrNPBH0DE3n6zcog3j86KLh+7+98PODr2A1sJVZjMpX+51NIYa4Zx9fvGuxF1 qaFA== X-Gm-Message-State: ALoCoQkCncofGUw60F4JlErOzaqRE/t5EHbSGFkDiIGi73kQ2cY3Nqpx8pAbkFaEXWckR6DCc/6B X-Received: by 10.60.141.9 with SMTP id rk9mr42033595oeb.12.1399409026786; Tue, 06 May 2014 13:43:46 -0700 (PDT) MIME-Version: 1.0 Sender: agrieve@google.com Received: by 10.182.135.40 with HTTP; Tue, 6 May 2014 13:43:26 -0700 (PDT) In-Reply-To: References: From: Andrew Grieve Date: Tue, 6 May 2014 16:43:26 -0400 X-Google-Sender-Auth: qzNr1zhAgza7CVuhMkwCQsevdvY Message-ID: Subject: Re: CB-285 (FileSystem paths) To: dev Content-Type: multipart/alternative; boundary=047d7b3a9cacf09c0204f8c14d89 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b3a9cacf09c0204f8c14d89 Content-Type: text/plain; charset=UTF-8 There are two types of config for file: 1. You can do is disable parts of the filesystem (doubt anyone would do this) 2. You can switch where PERSISTENT filesystem maps to (sane place vs legacy place) What's missing is a way to retrieve the paths that you might want. No configuration required for this part. I'd like to avoid making the calls look like they are a part of the file spec, so that users won't be tempted to think that it would work in a non-Cordova environment. On Tue, May 6, 2014 at 1:47 PM, Brian LeRoux wrote: > This plugin is helpful though I can't help but wonder if we can't shoehorn > into specs (or at least provide spec feedback). > > Right now all config is done w/ config.xml instead of programmatic (?) > > > On Tue, May 6, 2014 at 7:06 AM, Andrew Grieve > wrote: > > > Closer than ever to resolving this (woo!) > > > > The file plugin is now able to read & write to roots on the filesystem > > beyond PERSISTENT and TEMPORARY on iOS, Android, and BlackBerry (and > maybe > > others?) > > > > However, you still can't query for the location of these places (doh!) > > > > There's a file-extras plugin in cordova-labs: > > > > > https://git-wip-us.apache.org/repos/asf?p=cordova-labs.git;a=blob;f=file-extras/fileextras.js;h=1f8f88f7222bd4022f2f802f6825c189b10445d9;hb=aaf61d4 > > > > That was used to experiment with an API for this. I think the API is > pretty > > much fine, and I'd like to add it to the core file plugin rather than > have > > it as a separate plugin. > > > > This would add: > > cordova.plugins.file.getDirectoryForPurpose(purpose, options, win, fail) > > > > Where purpose can be one of: > > var Purpose = { > > 'data': 0, // General application data (default) > > 'documents': 1, // Files that are meaningful to other applciations > > (e.g. Office files) > > 'cache': 2, // Temporary files that should survive app restarts > > 'temp': 3, // Files that can should be deleted on app restarts > > 'app-bundle': 4 // The application bundle (iOS only) > > } > > > > And also add convenience wrappers: > > cordova.plugins.file.getDataDirectory(syncable, win) > > cordova.plugins.file.getDocumentsDirectory(win) > > cordova.plugins.file.getTempDirectory(win) > > cordova.plugins.file.getCacheDirectory(win) > > > > > > Any comments on this? > > > --047d7b3a9cacf09c0204f8c14d89--