File meta data is stored within the file system and directories. It tracks information about each of the file which is typically referred to as file attributes. File attributes include size of a file, is it a directory, a symbolic link, a regular file, determine if the file is hidden, retrieve the last modified time and find when a file was created.
Setup
Straight up Java
File.isDirectory
Java 7 File I/O
BasicFileAttributes.isDirectory