Does anyone know if there is a function in java with takes as an argument a path of a directory and returns all the including files as array
Thank you
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
Does anyone know if there is a function in java with takes as an argument a path of a directory and returns all the including files as array
Thank you
Not quite sure what you mean, but you are able to read/write objects from/to a file using serialization and object streams.
Eg. You could write an ArrayList x to file y, or read ArrayList x back from the file.
Discover the secrets of the Java Serialization API
Java Tutorial: Introduction to Object Serialization
Lesson 4: Serialization
Last edited by newbie; January 9th, 2011 at 08:04 AM.
See the API for File, in particular the listFiles method
Hello gvgenop,
Welcome to the Java Programming Forums.
Try doing a search.. Similar questions have been answered here before.
This will help you get started:
http://www.javaprogrammingforums.com...directory.html
Please use [highlight=Java] code [/highlight] tags when posting your code.
Forum Tip: Add to peoples reputation by clicking the button on their useful posts.