Chapter 9. Accessing Files and Directories

In this chapter, you'll explore how you identify, access, and manipulate files and directories on your hard drive. This will include the ability to create new files and directories, but not to read or write files. You'll get to that starting in the next chapter.

In this chapter you will learn:

  • How you create File objects and use them to examine files and directories

  • How you can use File class methods to examine the contents of the hard drives on your system

  • How to create new files and directories on your hard drive

  • How to create temporary files

  • How you create FileOutputStream objects

Get Ivor Horton's Beginning Java™ 2, JDK™ 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.