Quote:
Originally Posted by scoobie
Hi,
Does anyone know of any methods in Java that allow you to check what file system is being used by a particular operating system. or how one would go about coding it.
thanking you in advanced
scoobie
|
you can identify os using
System.getProperty("os.name");
and can use code like
if(System.getProperty("os.name").indexOf("Windows" )!=-1)
{
filename = "c:\\test.txt";
}
else
{
filename = "/home/test.txt";
}