Files are organized in trees (*): directories can contain regular files and directories. We will now model this structure in Java. For this purpose we define our own classes File, Directory and RegularFile. File is an abstract class inherited from Directory and RegularFile. The class Directory is used to represent directories, the class RegularFile represents regular files, i.e. files that are not directories. A directory manages a list of files that are contained in the directory.
Copyright © 2020 | Truelancer.com