Posts

Showing posts from July, 2018

How To find hidden Files in Java

Here in this blog we will explain how to find hidden file in system can be linux or windows using File operation in java  As per Java Document method details are below  isHidden public boolean isHidden() Tests whether the file named by this abstract pathname is a hidden file. The exact definition of hidden is system-dependent. On UNIX systems, a file is considered to be hidden if its name begins with a period character ( '.' ). On Microsoft Windows systems, a file is considered to be hidden if it has been marked as such in the filesystem. Returns: true if and only if the file denoted by this abstract pathname is hidden according to the conventions of the underlying platform Throws: SecurityException - If a security manager exists and its SecurityManager.checkRead(java.lang.String) method denies read access to the file Sample Code : package com.learnjavabyanand; import java.io.*; /** * @author Anand * */ public class CheckHideenFile