You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2008/05/25 13:31:56 UTC

[jira] Created: (IO-171) IO assumes there are only two OSes: Windows and Unix

IO assumes there are only two OSes: Windows and Unix
----------------------------------------------------

                 Key: IO-171
                 URL: https://issues.apache.org/jira/browse/IO-171
             Project: Commons IO
          Issue Type: Bug
            Reporter: Sebb
            Priority: Minor


Just noticed that IO assumes systems are either:

Windows-like:
* File.separatorChar = \
* Case-insensitive matching

or

Unix-like:
* File.separatorChar = /
* Case-sensitive matching

It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.

For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).

Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601106#action_12601106 ] 

Niall Pemberton commented on IO-171:
------------------------------------

Sounds like there isn't an ideal solution for OpenVMS and my first thought is that the way it currently works ("case-sensitive" for OpenVMS) is as good as any. If OpenVMS users wanted in-sensitive matching then they would use IOCase.INSENSITIVE.

> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IO-171) Document that IOCase assumes there are only two OSes: Windows and Unix

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Niall Pemberton updated IO-171:
-------------------------------

          Summary: Document that IOCase assumes there are only two OSes: Windows and Unix  (was: IO assumes there are only two OSes: Windows and Unix)
    Fix Version/s: 2.0
      Component/s: Utilities

> Document that IOCase assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>            Reporter: Sebb
>            Priority: Minor
>             Fix For: 2.0
>
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601155#action_12601155 ] 

Niall Pemberton commented on IO-171:
------------------------------------

> The problem with the current behaviour on VMS is that the implicit (default) choice is not guaranteed to be correct.

OK well I gave my opnion - "from my PoV that doesn't add anything to IO or help OpenVMS users - as it stands currently it doesn't work for OpenVMS users who wants "case-insensitive" - with that kind of change it doesn't work for ALL OpenVMS users - plus it messes up any existing OpenVMS users who have been relying on the current behaviour." If you want to change the JavaDoc to put a note about OpenVMS, thats fine by me - personally I'm against throwing the exceptions since it adds unecessary additional complexity that solves nothing for no-one. OpenVMS users need to choose the correct IOCase flavour they want to use and understand the implications of such in their enviroment.

> There is still the general problem that the separator character and case-sensitivity are not related in any way.

Why should they be? I don't see any problem with FilenameUtils.SYSTEM_SEPARATOR on OpenVMS and I don't see any reason why the separator character should be linked to case sensitivity of file names. To be honest, just saying "theres is still the general problem..." is too vague - please be specific about actual problems in Commons IO and what you propose should be done about it.

> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "Sam Berlin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606815#action_12606815 ] 

Sam Berlin commented on IO-171:
-------------------------------

I just happened to stumble across this issue, and have no idea if this comment is relevant, but...

The default FS on OS X has its own quirks.  It is case preserving, but only partially case insensitive (from Java's eyes atleast).  Consider this:

 // Assume no file named 'Foo', 'foo', or any variation exists on disk
 File a = new File("foo");
 File b = new FIle("Foo");
 a.equals(b); // FALSE
 a.getCanonicalFile().equals(b); // False
 b.createNewFile(); // create 'Foo'
 a.getCanonicalFile().equals(b); // True -- because 'a' returned 'Foo' from getCanonicalFile
 b.getCanonicalFile().equals(a); // False -- because 'a' is still 'foo'

Basically, File.equals essentially looks at String.equals of the filename.  If you want to see if the file exists on disk, you have to use getCanonicalFile, but that only works if there's a file on disk it can canonicalize to.

(FWIW, this is all going off memory of workarounds I've had to implement because of the quirks.) 

> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (IO-171) Document that IOCase assumes there are only two OSes: Windows and Unix

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Niall Pemberton resolved IO-171.
--------------------------------

    Resolution: Fixed

I have added a note to IOCase.SYSTEM:

http://svn.apache.org/viewvc?view=revision&revision=1002159

> Document that IOCase assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>            Reporter: Sebb
>            Priority: Minor
>             Fix For: 2.0
>
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601250#action_12601250 ] 

Sebb commented on IO-171:
-------------------------

@Matt: what is the OSX file separator character? Is it "/" - I assume - or something else?

> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "Matt Benson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625409#action_12625409 ] 

Matt Benson commented on IO-171:
--------------------------------

wow.  Round and round.  Maybe we should leave things as-is, and provide runtime tests that require a writable location and test the case-sensitivity of a given volume at RT.  Maybe that's useful and maybe it isn't, but at least we can be explicit about what we're doing and provide better guarantees.  Note:  AFAICT, you must know (or be able to create) an existing file in order to make Java 5 on OS X tell you via canonical files whether the disk is case-sensitive.  I don't know what that actually indicates is going on in the java.io.File implementation, obviously.

> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601248#action_12601248 ] 

Sebb commented on IO-171:
-------------------------

Sorry, no idea - but that does not mean there aren't any.

I've only got recent experience of Windows/VMS/Un*x

Perhaps one of the IBM OSes?
Novell Netware?

> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601114#action_12601114 ] 

Sebb commented on IO-171:
-------------------------

That's why I suggested having an "Unknown" state for the system default.

I'm not sure whether case-sensitve is yet the most common setting.

If the code is not changed, at least the Javadoc needs to make clear that the SYSTEM setting for VMS is arbitrary, and does not relate to any host settings.

> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "Matt Benson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601281#action_12601281 ] 

Matt Benson commented on IO-171:
--------------------------------

Yep, it's like a nice, well-behaved *nix system... without cs.  :(

> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IO-171) Document that IOCase assumes there are only two OSes: Windows and Unix

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Niall Pemberton updated IO-171:
-------------------------------

    Issue Type: Task  (was: Bug)

> Document that IOCase assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Task
>          Components: Utilities
>            Reporter: Sebb
>            Priority: Minor
>             Fix For: 2.0
>
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "Torsten Curdt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12624604#action_12624604 ] 

Torsten Curdt commented on IO-171:
----------------------------------

Henri: Even HFS can be case sensitive. It's just that the default root system Apple provides is not using it.

> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12624601#action_12624601 ] 

Henri Yandell commented on IO-171:
----------------------------------

Sod OpenVMS, but OS X is a big enough deal that we should be concerned with it.

Configuring OS X for true case sensitivity means using UFS iirc. Which is slow and crappy. Tried it once, laughed and moved back.

> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601237#action_12601237 ] 

Niall Pemberton commented on IO-171:
------------------------------------

OK so what other operating systems besides OpenVMS is this a problem for?

> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606872#action_12606872 ] 

Niall Pemberton commented on IO-171:
------------------------------------

> Since the setting cannot be determined, I think IOCase.SYSTEM should be set to null in such cases.

We seem to just be re-cycling the same opnions - I'm still against this and think the we should leave the behaviour asis and just improve the javadocs



> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "mike bell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606169#action_12606169 ] 

mike bell commented on IO-171:
------------------------------

Just to make things more exciting netware uses both / and \ and is case insensitive :)

format: server/volume:path\path
But admittedly, as long as one is local to the server, one usually only uses backslash. 
volume:path\path

> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "Matt Benson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606856#action_12606856 ] 

Matt Benson commented on IO-171:
--------------------------------

At the risk of beating the proverbial dead horse, it is my understanding the OSX can be configured for (true) case-sensitivity.  Maybe, though, given the fact that different attached volumes might have different filesystems on any given platform, using the default behavior for the current OS is the best we can do...

> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606857#action_12606857 ] 

Sebb commented on IO-171:
-------------------------

So OSX is very similar to OpenVMS in that case-sensitivity is not defined by the system type.

I.e. whatever IOCase SYSTEM is initialised to will be wrong in some cases.

Since the setting cannot be determined, I think IOCase.SYSTEM should be set to null in such cases.
Rather than just let NPEs happen, the code should check for null and throw a more suitable exception.

> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601325#action_12601325 ] 

Niall Pemberton commented on IO-171:
------------------------------------

Found this, which has a table indicating case sensitivity for file systems:
  http://en.wikipedia.org/wiki/Filename

Besides the OSX (HFS+) and VMS systems already mentioned the other case-insensitive file systems don't seem relevant anymore (i.e. Amiga*, PDP-11, RT-11)

So looks like OSX is in the same boat as VMS - may or may not be case-sensitive.

> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "Stephen Colebourne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601365#action_12601365 ] 

Stephen Colebourne commented on IO-171:
---------------------------------------

The best approach to this issue may simply be better documentation of the assumptions of IOCase. Trying to make it too clever is likely to cause problems, especially as we don't have direct access to many OS.

> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606708#action_12606708 ] 

Sebb commented on IO-171:
-------------------------

According to this article, Mac OSX using HFS+ is case-preserving but case-insensitive:

http://www.kernelthread.com/mac/osx/arch_fs.html

I.e. the same as Windows.

> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601143#action_12601143 ] 

Niall Pemberton commented on IO-171:
------------------------------------

I'm just wondering how you're *unknown* state would work exactly, perhaps something like:
 * if the system is "OpenVMS" then IOCase's methods (e.g.isCaseSensitive(), checkCompareTo(), etc) throw an exception

>From my PoV that doesn't add anything to IO or help OpenVMS users - as it stands currently it doesn't work for OpenVMS users who wants "case-insensitive" - with that kind of change it doesn't work for ALL OpenVMS users - plus it messes up any existing OpenVMS users who have been relying on the current behaviour.

> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "Matt Benson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601244#action_12601244 ] 

Matt Benson commented on IO-171:
--------------------------------

While I'm too lazy to properly read the whole issue, I'll contribute the knowledge that OSX defaults to a non-cs filesystem; if you want cs you have to set that up explicitly.  Kind of irritated me; I had already put enough stuff on the disk that I didn't want to screw with it by the time I found out.  :(  Ant _still_ lacks a decent way to detect this at RT so if anybody has any brilliant ideas count me interested.

> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601149#action_12601149 ] 

Sebb commented on IO-171:
-------------------------

The intention was to initialise the SYSTEM state to Unknown for VMS systems.

If the user tries to use the SYSTEM setting, that should throw an Exception.

However, the use of the specific insensitive/case-sensitive settings would be OK, because the user has chosen.

The problem with the current behaviour on VMS is that the implicit (default) choice is not guaranteed to be correct.

There is still the general problem that the separator character and case-sensitivity are not related in any way.
It just so happens to be true at present for Unix & Windows, but in general it is not possible to derive one from the other.
VMS is just one example of this.

> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IO-171) IO assumes there are only two OSes: Windows and Unix

Posted by "Sebb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IO-171?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601230#action_12601230 ] 

Sebb commented on IO-171:
-------------------------

In the class IOCase, the SYSTEM case-sensitivity setting is defined as:

    public static final IOCase SYSTEM = new IOCase("System", !FilenameUtils.isSystemWindows());

where

    static boolean isSystemWindows() {
        return SYSTEM_SEPARATOR == WINDOWS_SEPARATOR;
    }

which directly ties case-sensitivity to the file separator

> IO assumes there are only two OSes: Windows and Unix
> ----------------------------------------------------
>
>                 Key: IO-171
>                 URL: https://issues.apache.org/jira/browse/IO-171
>             Project: Commons IO
>          Issue Type: Bug
>            Reporter: Sebb
>            Priority: Minor
>
> Just noticed that IO assumes systems are either:
> Windows-like:
> * File.separatorChar = \
> * Case-insensitive matching
> or
> Unix-like:
> * File.separatorChar = /
> * Case-sensitive matching
> It may well be true that there are only two different file sepator characters, but it is not true that all non-Windows systems use case-sensitive matching.
> For example, OpenVMS uses a file separator char of /, but originally only supported case-insensitive file names (always shown as uppercase).
> Current versions of OpenVMS support both upper and lower-case; the default is to use case-insenstive matching (and upper case names).
> Perhaps the IOCase.SYSTEM constant needs to have an "Unknown" or "Variable" setting for this; it would then be an error to use IOCase.SYSTEM to determine the case sensitivity.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.