

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Check if a file is hidden in Java
<p style="">The java.io.File class provides useful methods on file. This example shows how to check a file hidden or not by using the file.isHidden() method of File class.</p><h2>Example</h2><pre class="prettyprint notranslate">import java.io.File; public class Main { public static void main(String[] args) { File file = new File("C:/java.txt"); System.out.println(file.isHidden()); } }</pre><h2 class="result notranslate">Result</h2><p>The above code sample will produce the following result (if the file "java.txt" exists and is hidden in 'C' drive).</p><pre class="result notranslate">true</pre>
- Related Questions & Answers
- Check if a File is hidden in C#
- Determine if File or Directory is hidden in Java
- Check whether the file is hidden or not in Java
- Check if a file exists in Java
- Java Program to check if a file or directory is readable
- How do I check if an element is hidden in jQuery?
- How to check if a file is readable, writable, or, executable in Java?
- Check whether a file is a directory in Java
- Check if a File exists in C#
- How to check if a file is a directory or a regular file in Python?
- Check if hidden files are displayed in the FileChooser or not in Java
- How to check if a file exists or not in Java?
- Check if a HashMap is empty in Java
- How to check if a file is connected with terminal in Python?
- Check if a directory is not empty in Java
Advertisements