Get drive letters
To Retrieve all the topmost directories you can use the following code snippet.
File.listRoots().each() { dir ->
println dir
}
On my Windows System it returns.
C:\ D:\ E:\ F:\ X:\ Z:\
On my Linux Sytems it returns.
/
To Retrieve all the topmost directories you can use the following code snippet.
File.listRoots().each() { dir ->
println dir
}
On my Windows System it returns.
C:\ D:\ E:\ F:\ X:\ Z:\
On my Linux Sytems it returns.
/