| Author |
How to get the directory list from linux system?
|
Gopu Akraju
Ranch Hand
Joined: Jan 13, 2008
Posts: 242
|
|
I am giving the path as This works fine under windows environment. But I want to change this according to linux system. How to mention about the linux file path? Is it something like below: B'cos under Linux, loops folder is under "/home/userrig/test/loops". Will it work? Thanks.
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24081
|
|
Linux doesn't use "\" in paths; it uses "/" instead, which doesn't need to be doubled. I'm not sure why most people don't realize this, but in most contexts Windows code is quite happy to use "/" as well. In any case, since the path is "/home/userrig/test/loops", the correct code is String filePath = "/home/userrig/test/loops";
|
[Jess in Action][AskingGoodQuestions]
|
 |
Gopu Akraju
Ranch Hand
Joined: Jan 13, 2008
Posts: 242
|
|
|
Thanks for the clarification. It was useful.
|
 |
Amit Ghorpade
Bartender
Joined: Jun 06, 2007
Posts: 2562
|
|
Hi Gopu Akraju please UseRealWords. B'cos is not a real word.
|
SCJP, SCWCD.
|Asking Good Questions|
|
 |
 |
|
|
subject: How to get the directory list from linux system?
|
|
|