[jira] [Created] (IO-289) Cleaning illegal characters from a file name

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (IO-289) Cleaning illegal characters from a file name

ASF GitHub Bot (Jira)
Cleaning illegal characters from a file name
--------------------------------------------

                 Key: IO-289
                 URL: https://issues.apache.org/jira/browse/IO-289
             Project: Commons IO
          Issue Type: Improvement
          Components: Utilities
    Affects Versions: 2.1
            Reporter: Emmanuel Bourg
            Priority: Minor
             Fix For: 2.2


FilenameUtils is missing a method to remove illegal characters from a file name. For example on Windows these characters are not allowed: /!|><*:?".

The characters could be either removed or replaced by another one (a space or an underscore for example).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (IO-289) Cleaning illegal characters from a file name

ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/IO-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13130607#comment-13130607 ]

Paul Benedict commented on IO-289:
----------------------------------

I hope you could pass in the replacement character.
               

> Cleaning illegal characters from a file name
> --------------------------------------------
>
>                 Key: IO-289
>                 URL: https://issues.apache.org/jira/browse/IO-289
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 2.1
>            Reporter: Emmanuel Bourg
>            Priority: Minor
>             Fix For: 2.2
>
>
> FilenameUtils is missing a method to remove illegal characters from a file name. For example on Windows these characters are not allowed: /!|><*:?".
> The characters could be either removed or replaced by another one (a space or an underscore for example).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (IO-289) Cleaning illegal characters from a file name

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/IO-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13130699#comment-13130699 ]

Joerg Schaible commented on IO-289:
-----------------------------------

It's unfortunately not enough to check for illegal characters. "aux.txt" or "nul.txt" are also illegal because of the file's basename matching a device name.
               

> Cleaning illegal characters from a file name
> --------------------------------------------
>
>                 Key: IO-289
>                 URL: https://issues.apache.org/jira/browse/IO-289
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 2.1
>            Reporter: Emmanuel Bourg
>            Priority: Minor
>             Fix For: 2.2
>
>
> FilenameUtils is missing a method to remove illegal characters from a file name. For example on Windows these characters are not allowed: /!|><*:?".
> The characters could be either removed or replaced by another one (a space or an underscore for example).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (IO-289) Cleaning illegal characters from a file name

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

    [ https://issues.apache.org/jira/browse/IO-289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13147895#comment-13147895 ]

Henri Yandell commented on IO-289:
----------------------------------

Feels like a painful one to implement - a steadily growing list of file systems and unhappy characters.
               

> Cleaning illegal characters from a file name
> --------------------------------------------
>
>                 Key: IO-289
>                 URL: https://issues.apache.org/jira/browse/IO-289
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 2.1
>            Reporter: Emmanuel Bourg
>            Priority: Minor
>             Fix For: 2.2
>
>
> FilenameUtils is missing a method to remove illegal characters from a file name. For example on Windows these characters are not allowed: /!|><*:?".
> The characters could be either removed or replaced by another one (a space or an underscore for example).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       
Reply | Threaded
Open this post in threaded view
|

[jira] [Resolved] (IO-289) Cleaning illegal characters from a file name

ASF GitHub Bot (Jira)
In reply to this post by ASF GitHub Bot (Jira)

     [ https://issues.apache.org/jira/browse/IO-289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb resolved IO-289.
---------------------

       Resolution: Won't Fix
    Fix Version/s:     (was: 2.2)

Each OS has different requirements for file names.
And the possible file names may even depend on the local file system settings.

So it's not possible to provide a generic method.
               

> Cleaning illegal characters from a file name
> --------------------------------------------
>
>                 Key: IO-289
>                 URL: https://issues.apache.org/jira/browse/IO-289
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 2.1
>            Reporter: Emmanuel Bourg
>            Priority: Minor
>
> FilenameUtils is missing a method to remove illegal characters from a file name. For example on Windows these characters are not allowed: /!|><*:?".
> The characters could be either removed or replaced by another one (a space or an underscore for example).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira