Re: File API: File's name property

2013-09-06 Thread Anne van Kesteren
On Wed, Sep 4, 2013 at 11:45 PM, Glenn Maynard gl...@zewt.org wrote: On Tue, Sep 3, 2013 at 12:04 PM, Anne van Kesteren ann...@annevk.nl wrote: The problem is that once you put it through the URL parser it'll become /. And I suspect given directory APIs and such it'll go through that layer at

Re: File API: File's name property

2013-09-06 Thread Arun Ranganathan
On Sep 6, 2013, at 11:42 AM, Anne van Kesteren wrote: On Wed, Sep 4, 2013 at 11:45 PM, Glenn Maynard gl...@zewt.org wrote: On Tue, Sep 3, 2013 at 12:04 PM, Anne van Kesteren ann...@annevk.nl wrote: The problem is that once you put it through the URL parser it'll become /. And I suspect given

Re: File API: File's name property

2013-09-06 Thread Anne van Kesteren
On Fri, Sep 6, 2013 at 4:42 PM, Anne van Kesteren ann...@annevk.nl wrote: On Wed, Sep 4, 2013 at 11:45 PM, Glenn Maynard gl...@zewt.org wrote: It might be better to wait until we have a filesystem API, then piggyback on that... Yeah, I wondered about that. It depends on whether we want to

Re: File API: File's name property

2013-09-06 Thread Glenn Maynard
On Fri, Sep 6, 2013 at 10:42 AM, Anne van Kesteren ann...@annevk.nlwrote: If the raw input to the URL parser includes a backslash, it'll be treated as a forward slash. I am not really expecting people to use encodeURI or such utilities. People who don't will have a bug, but all this is doing

Re: File API: File's name property

2013-09-04 Thread Glenn Maynard
On Tue, Sep 3, 2013 at 12:04 PM, Anne van Kesteren ann...@annevk.nlwrote: The problem is that once you put it through the URL parser it'll become /. And I suspect given directory APIs and such it'll go through that layer at some point. I don't follow. Backslashes in filenames are escaped in

Re: File API: File's name property

2013-09-03 Thread Arun Ranganathan
Well, https://www.w3.org/Bugs/Public/show_bug.cgi?id=23138 is to make the 'type' attribute a ByteString. Is that your request here for the name attribute as well? It wouldn't be wise to restrict '/' or '\' or try to delve too deep into platform land BUT the FileSystem API introduces directory

Re: File API: File's name property

2013-09-03 Thread Anne van Kesteren
On Tue, Sep 3, 2013 at 3:03 PM, Arun Ranganathan a...@mozilla.com wrote: Well, https://www.w3.org/Bugs/Public/show_bug.cgi?id=23138 is to make the 'type' attribute a ByteString. Is that your request here for the name attribute as well? I don't think you want those conversion semantics for

Re: File API: File's name property

2013-09-03 Thread Glenn Maynard
On Tue, Sep 3, 2013 at 9:03 AM, Arun Ranganathan a...@mozilla.com wrote: It wouldn't be wise to restrict '/' or '\' or try to delve too deep into platform land BUT the FileSystem API introduces directory syntax which might make being lax a fly in the ointment for later. I wouldn't object to

Re: File API: File's name property

2013-09-03 Thread Anne van Kesteren
On Tue, Sep 3, 2013 at 5:14 PM, Glenn Maynard gl...@zewt.org wrote: On Tue, Sep 3, 2013 at 10:17 AM, Anne van Kesteren ann...@annevk.nl wrote: I don't think you want those conversion semantics for name. I do think we want the value space for names across different systems to be equivalent,

Re: File API: File's name property

2013-09-03 Thread Anne van Kesteren
On Tue, Sep 3, 2013 at 5:54 PM, Glenn Maynard gl...@zewt.org wrote: On Tue, Sep 3, 2013 at 11:31 AM, Arun Ranganathan a...@mozilla.com wrote: And, restrict separators such as / and \. I thought we just agreed that \ is a platform-specific thing that File.name shouldn't restrict. / is a

Re: File API: File's name property

2013-09-03 Thread Anne van Kesteren
On Tue, Sep 3, 2013 at 5:31 PM, Arun Ranganathan a...@mozilla.com wrote: Which in fact is how I think we should do File.name. We'll stick to DOMString, but think it should specify a conversion to a byte sequence using utf-8. And, restrict separators such as / and \. That doesn't solve the

Re: File API: File's name property

2013-09-03 Thread Arun Ranganathan
On Sep 3, 2013, at 12:28 PM, Anne van Kesteren wrote: On Tue, Sep 3, 2013 at 5:14 PM, Glenn Maynard gl...@zewt.org wrote: On Tue, Sep 3, 2013 at 10:17 AM, Anne van Kesteren ann...@annevk.nl wrote: I don't think you want those conversion semantics for name. I do think we want the value space

Re: File API: File's name property

2013-09-03 Thread Glenn Maynard
On Tue, Sep 3, 2013 at 11:31 AM, Arun Ranganathan a...@mozilla.com wrote: And, restrict separators such as / and \. I thought we just agreed that \ is a platform-specific thing that File.name shouldn't restrict. / is a directory separator on just about every platform, but \ can appear in

Re: File API: File's name property

2013-08-29 Thread Glenn Maynard
On Thu, Aug 29, 2013 at 9:48 AM, Anne van Kesteren ann...@annevk.nl wrote: As currently specified File's name property seems to be a code unit sequence. In zip archives the resource's path is a byte sequence. I don't really know what popular file systems do. Given that a File has to be

Re: File API: File's name property

2013-08-29 Thread Anne van Kesteren
On Thu, Aug 29, 2013 at 4:10 PM, Glenn Maynard gl...@zewt.org wrote: I don't think it makes sense to expect filenames to round-trip through File.name, especially for filenames with a broken or unknown encoding. File.name should be a best-effort at converting the platform filename to something

Re: File API: File's name property

2013-08-29 Thread Glenn Maynard
On Thu, Aug 29, 2013 at 10:14 AM, Anne van Kesteren ann...@annevk.nlwrote: On Thu, Aug 29, 2013 at 4:10 PM, Glenn Maynard gl...@zewt.org wrote: I don't think it makes sense to expect filenames to round-trip through File.name, especially for filenames with a broken or unknown encoding.

Re: File API: File's name property

2013-08-29 Thread Anne van Kesteren
On Thu, Aug 29, 2013 at 4:46 PM, Glenn Maynard gl...@zewt.org wrote: All constructing a File does is give a name (and date) to a Blob. It doesn't create an association to an on-disk file, and shouldn't be restricted to filenames the local platform's filesystem can represent. Yes, but it can

Re: File API: File's name property

2013-08-29 Thread Glenn Maynard
On Thu, Aug 29, 2013 at 10:51 AM, Anne van Kesteren ann...@annevk.nlwrote: On Thu, Aug 29, 2013 at 4:46 PM, Glenn Maynard gl...@zewt.org wrote: All constructing a File does is give a name (and date) to a Blob. It doesn't create an association to an on-disk file, and shouldn't be