Returns an object to iterate over the paths of the root directories.
A file system provides access to a file store that may be composed of a number of distinct file hierarchies, each with its own top-level root directory. Unless denied by the security manager, each element in the returned iterator corresponds to the root directory of a distinct file hierarchy. The order of the elements is not defined. The file hierarchies may change during the lifetime of the Java virtual machine. For example, in some implementations, the insertion of removable media may result in the creation of a new file hierarchy with its own top-level directory.
When a security manager is installed, it is invoked to check access
to the each root directory. If denied, the root directory is not returned
by the iterator. In the case of the default provider, the SecurityManager.checkRead(String)
method is invoked to check read access
to each root directory. It is system dependent if the permission checks
are done when the iterator is obtained or during iteration.
Diagram: FileSystem