Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
Web Technologies
40.3k+ articles
Java
10.1k+ articles
Difference Between
4.2k+ articles
Java-Functions
4.1k+ articles
Java Programs
2.1k+ articles
Java-IO package
240+ articles
Java Examples
230+ articles
Java-I/O
75 articles
Java-Files
66 articles
java-file-handling
34 articles
Java-File Class
53 posts
Popular Articles
Recent Articles
FileOutputStream in Java
Last Updated: 10 March 2025
In Java, the FileOutputStream class is a subclass of OutputStream. It is used to write data to a file as a stream of bytes. FileOutputStream
...read more
Java
Java-I/O
Java-File Class
Java Program to Search for a File in a Directory
Last Updated: 21 October 2020
Searching files in Java can be performed using the File class and FilenameFilter interface. The FilenameFilter interface is used to filter f
...read more
Java
Java Programs
Java-File Class
File listFiles() method in Java with Examples
Last Updated: 30 January 2019
The listFiles() method is a part of File class.The function returns an array of Files denoting the files in a given abstract pathname if the
...read more
Java
Java-Functions
Java-IO package
Java-File Class
Similar Topics
Web Technologies
40.3k+ articles
Java
10.1k+ articles
Difference Between
4.2k+ articles
Java-Functions
4.1k+ articles
Java Programs
2.1k+ articles
Java-IO package
240+ articles
Java Examples
230+ articles
Java-I/O
75+ articles
Java-Files
66+ articles
java-file-handling
34+ articles
File getName() method in Java with Examples
Last Updated: 30 January 2019
The getName() method is a part of File class. This function returns the Name of the given file object. The function returns a string object
...read more
Java
Java-Functions
Java-IO package
Java-File Class
File getPath() method in Java with Examples
Last Updated: 30 January 2019
The getPath() method is a part of File class. This function returns the path of the given file object. The function returns a string object
...read more
Java
Java-Functions
Java-IO package
Java-File Class
File getCanonicalPath() method in Java with Examples
Last Updated: 11 March 2024
The getCanonicalPath() method is a part of the Path class. This function returns the Canonical pathname of the given file object. If the pat
...read more
Java
Java-Functions
Java-IO package
Java-File Class
File getAbsolutePath() method in Java with Examples
Last Updated: 30 January 2019
The getAbsolutePath() method is a part of File class. This function returns the absolute pathname of the given file object.If the pathname o
...read more
Java
Java-Functions
Java-IO package
Java-File Class
File mkdirs() method in Java with examples
Last Updated: 28 January 2019
The mkdirs() method is a part of File class. The mkdirs() function is used to create a new directory denoted by the abstract pathname and al
...read more
Java-Functions
Java Programs
Java-IO package
Java-File Class
File isDirectory() method in Java with Examples
Last Updated: 28 January 2019
The isDirectory() function is a part of File class in Java . This function determines whether the is a file or directory denoted by the abst
...read more
Java-Functions
Java Programs
Java-IO package
Java-File Class
File createTempFile() method in Java with Examples
Last Updated: 20 June 2021
The createTempFile() function creates a temporary file in a given directory ( if directory is not mentioned then a default directory is sele
...read more
Java-Functions
Java Programs
Java-IO package
Java-File Class
File mkdir() method in Java with examples
Last Updated: 28 January 2019
The mkdir() method is a part of File class. The mkdir() function is used to create a new directory denoted by the abstract pathname. The fun
...read more
Java-Functions
Java Programs
Java-IO package
Java-File Class
File renameTo() method in Java with examples
Last Updated: 28 January 2019
The renameTo() method is a part of File class. The renameTo() function is used to rename the abstract path name of a File to a given path na
...read more
Java
Java-Functions
Java-IO package
Java-File Class
File length() method in Java with Examples
Last Updated: 09 October 2022
The length() function is a part of File class in Java . This function returns the length of the file denoted by the this abstract pathname w
...read more
Java-Functions
Java Programs
java-file-handling
Java-IO package
Java-File Class
File exists() method in Java with examples
Last Updated: 12 December 2021
The exists() function is a part of the File class in Java. This function determines whether the is a file or directory denoted by the abstra
...read more
Java
Java-Functions
Java Programs
java-file-handling
Java-IO package
Java-File Class
File createNewFile() method in Java with Examples
Last Updated: 12 May 2020
The createNewFile() function is a part of File class in Java . This function creates new empty file. The function returns true if the abstr
...read more
Java-Functions
Java Programs
java-file-handling
Java-IO package
Java-File Class
1
2
3
4
>>
Last
1
2
3
4
>>
Last
1
2
3
4
>>
Last
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !