This tutorial demonstrate how to check a file is hidden or not in java.
This tutorial demonstrate how to check a file is hidden or not in java.This example demonstrate how to check a file is hidden at a given path or not. The method isHidden() of the File class check for its hidden property of a file. As in the file path we see '\' (backslash) that is used to denote file separation but here in this example File.separator is used.
import java.io.File;
|
The output of this example is either true or false depends on the file have hidden property at the specified path that is set in the program above.