[Advanced-java] Portable path delimiters
David Rosenstrauch
david.rosenstrauch at aleri.com
Wed Jul 2 21:07:12 2003
Use
System.getProperty("file.separator")
and
System.getProperty("path.separator")
For more info, see:
http://java.sun.com/j2se/1.4.1/docs/api/java/lang/System.html#getProperties()
DR
On Wednesday 02 July 2003 05:58 pm, peter robinson wrote:
> Hi all,
>
> can anyone tell me the best way to create OS-independent path delimiters
> while creating files within a new directory within a java application.
> Although everything works well with *nix slashes on windows by hardcoding
> them, I wonder if there is a better way?
>
> Thanx
>
> Peter