| Author |
Differentiate between file and a folder
|
a gandhi
Greenhorn
Joined: Jan 19, 2004
Posts: 5
|
|
Hi, I am getting all the files from a folder. A folder can have files and subfolders also. I want to know if there is a way in java to differentiate between a folder and a file. Thanks...
|
 |
Don Kiddick
Ranch Hand
Joined: Dec 12, 2002
Posts: 580
|
|
myFile.isDirectory() The APi is my friend.
|
 |
Jim Yingst
Wanderer
Sheriff
Joined: Jan 30, 2000
Posts: 18670
|
|
|
The File class has an isDirectory() method which should be what you want.
|
"I'm not back." - Bill Harding, Twister
|
 |
 |
|
|
subject: Differentiate between file and a folder
|
|
|