← Back to team overview

syncany-team team mailing list archive

Environment Detection

 

Dear all,

while trying to set up a gui for Syncany with SWT library, I need to make
some customization depending on underlying OS.

I've seen that there is a EnvironmentUtil class handling detection of OS.

This detection is based on File.separatorChar and doesn't allow fine
grained OS identification (versions of windows, linux vs mac osx, etc.)

What do you think of keeping the same interface for the class but changing
detection method to

System.getProperty("os.name")

Existing values for os.name are available here

http://mindprod.com/jgloss/properties.html#OSNAME

What do you think ?
If OK I can propose a new class with extra method
isMacOsx();
isLinux();

-- 
Vincent Wiencek
vwiencek@xxxxxxxxx

Follow ups