Re: [File API: FileSystem] Path restrictions and case-sensitivity

On 5/8/2011 1:14 PM, timeless wrote:
> On Sun, May 8, 2011 at 11:04 PM, Charles Pritchard<chuck@jumis.com>  wrote:
>> The one take-away I have from that bug: it would have been nice to have a
>> more descriptive error message.
>> It took awhile to figure out that the path length was too long for the
>> implementation.
> if the exception included a suggested legal / available filename,
> would that have helped?
Yes, that would help.

> e.g. if i try to create a file whose name is 2345 characters long, and
> my exception suggests a file that's 255 characters long (probably via
> truncation, although possibly using some tilde stuff or whatever), i
> suspect i might be able to figure out that it's a 256 character limit.
> Similarly if i try to create a file w/ a<:>  in it, and i get an
> exception with a file that doesn't have one, i might be able to
> understand what's going wrong and what to do.

Some of that reminds me of the get temporary filename APIs
in many server side scripting languages.

At the very least, I'd like a larger exception vocabulary. A getSafeFileName
and/or suggestion in the error would certainly be helpful.

Received on Sunday, 8 May 2011 20:28:22 UTC