Problem file.getname() for root directory

I am using my own renderer to Jtree (which is showing windows file system) and have next problem.

while trying to get name for files system dont see root one, i.e.:

File f =new File("c:\\");

System.out.print(f.GetName());

shows nothing, while its perfectly working for other files.

also - can some1 tell how to get Desktop diretory in Windows. (i already tryed getHomeDirectory and getDefaultDirectory - but they r not showing needed info, so i m using list of roots atm)

Message was edited by:

Alantie

[611 byte] By [Alantiea] at [2007-11-27 11:33:21]
# 1

You can start with [1] for showing the file system in an OS-independent way.

[1] http://www.pushing-pixels.org/?p=58

kirillga at 2007-7-29 16:50:47 > top of Java-index,Desktop,Core GUI APIs...