Results 1 to 5 of 5
- 12-19-2012, 05:03 PM #1
Member
- Join Date
- Dec 2012
- Posts
- 2
- Rep Power
- 0
- 12-19-2012, 05:06 PM #2
Re: XML containing directory structure of root folder
Can we provide code? No. That's not what this forum is for.
Can we help you write the code yourself? Sure, if you ask a more specific question. Which part of this are you stuck on? What have you tried? Where is your SSCCE?How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 12-19-2012, 05:52 PM #3
Member
- Join Date
- Dec 2012
- Posts
- 2
- Rep Power
- 0
Re: XML containing directory structure of root folder
I am not getting how to recursively traverse all the sub folders and files and what should be the tags that are needed to be there in XML file.
- 12-19-2012, 05:59 PM #4
Re: XML containing directory structure of root folder
Perhaps you should start by creating an example XML file from a simple directory.
Also check out the File class API for quite a few useful methods.How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 12-21-2012, 05:20 AM #5
Senior Member
- Join Date
- Jun 2007
- Location
- Bali, Indonesia
- Posts
- 696
- Rep Power
- 6
Re: XML containing directory structure of root folder
The File class has method to retrieve a list of files / directory on the defined path, check the listFiles() method. It will give you an array of Files under the specified path. It also has method to check where the File object representing a file or a directory, check the isDirectory() or isFile() method. You just need to combine these method and create a function that recursively read the directory structures.
Website: Learn Java by Examples
Similar Threads
-
Error deploying web application directory ROOT
By busymanis in forum GWTReplies: 0Last Post: 09-23-2010, 07:34 AM -
Directory Structure
By rummy in forum New To JavaReplies: 1Last Post: 01-21-2010, 12:03 PM -
Listing file system from root directory
By Java Tip in forum Java TipReplies: 1Last Post: 04-18-2009, 10:03 AM -
JSP/Servlet – getting root directory
By Java Tip in forum Java TipReplies: 1Last Post: 01-06-2009, 08:51 AM -
root directory
By raghu9198 in forum New To JavaReplies: 19Last Post: 01-06-2009, 03:11 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks