File Class

The File class hides the differences of a variety of operating systems and file systems. The File class provides a common interface for handling files and directories. The File class does not manage the reading and writing of data to files. The stream classes are used to read and write data to a file.

Suppose that you are writing an application that needs to run on Unix and Windows. Unix and Windows have fundamental differences in the representation of filenames and locations.

Unix path- and filenames use the path separator “/” and do not include a drive location. All file locations are created off the root directory location, which is represented by the character “/”. For example, the filename class.dat is stored in the usr directory ...

Get Borland® JBuilder™ Developer’s Guide 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.