[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-nio-discuss
Subject:    Anyway to get the chars that are not valid in filenames
From:       i30817 () gmail ! com (Paulo Levi)
Date:       2009-07-29 18:42:55
Message-ID: 212322090907291142h27992dbbkb2d1e3de36aef1e5 () mail ! gmail ! com
[Download RAW message or body]

Yeah, but that is exactly why it would be the responsibility of the
platform to bind that.
If i have to produce filenames from strings of unchangeable input I'd
like to produce something that is not a arbitrary  UID.

Nevertheless, now i'm using whitelisting - replace by space anything
not alphanumeric or "-", "&" and "." in the unicode range (canonical
equivalence).

On Wed, Jul 29, 2009 at 4:23 PM, Martin Buchholz<martinrb at google.com> wrote:
> On Tue, Jul 28, 2009 at 16:12, Paulo Levi<i30817 at gmail.com> wrote:
>> In a platform independent manner of course.
>> I sometimes have to convert strings into filenames (and it is
>> important to users to read them yes) and fall afoul of this
>> MSDN Path..::.GetInvalidFileNameChars Method seems like it would work
>> as a windows binding. Anyway in the jdk (1.6) to do this?
>> (and it really should be in the Paths api too).
>
> In the general case, a filesystem could use arbitrary rules
> for which sequence of characters is a valid file name.
> The ScrabbleFileSystem might require that every file name
> is a word from the official Scrabble (TM) dictionary.
>
> Martin
>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic