Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Determining if a File or Directory exist

In this section, you will learn how to determine a file or directory exit or not.

Tutorial Details:

This is a very simple problem. You just have to determine whether a file or directory exists or not. If it exists it returns true otherwise in the else condition, it retunes vice-versa.

The following program creates an object of File class and checks whether the given file exists or not by using exists() method of the class.


 

Rate Tutorial:
http://www.roseindia.net/java/beginners/file-directory-exists.shtml

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Determining if a File or Directory exist

View Tutorial:
Determining if a File or Directory exist

Related Tutorials:

Java Q&A - Java Still Open
Java Q&A - Java Still Open
 
Encapsulate reusable functionality in JSP
This tutorial shows you how you can encapsulate the resuable functionality in JSP pages.
 
Add MP3 capabilities to Java Sound with SPI - JavaWorld November 2000
Add MP3 capabilities to Java Sound with SPI - JavaWorld November 2000
 
Automate your build process using Java and Ant - JavaWorld October 2000
Automate your build process using Java and Ant - JavaWorld October 2000
 
The art of EJB deployment - JavaWorld August 2001
The art of EJB deployment - JavaWorld August 2001
 
JSP best practices
Follow these tips for reusable and easily maintainable JavaServer Pages
 
Deploy code servers in Jini systems
Deploy code servers in Jini systems
 
Smartly load your properties
Smartly load your properties
 
Once again, only introduction
Once again, only introduction
 
Very interesting
Very interesting
 
Good ideas
Good ideas
 
Java Mime Magic Library
Java Mime Magic Library jMimeMagic is a Java library for determining the MIME type of files or streams.
 
Commons Launcher
The Launcher Component is designed to be a cross platform Java application launcher.
 
JSP Tutorial
Adding dynamic content via expressionsAs we saw in the previous section, any HTML file can be turned into a JSP file by changing its extension to .jsp. Of course, what makes JSP useful is the ability to embed Java. Put the following text in a file wit
 
Reader-Submitted Tech Tip: Peeking Under Mount Points
Find out how to use NFS to inspect the underlying directory structure if the reported disk usage seems inconsistent.
 
Community Submission: A Recovery CD for the Solaris OS and VERITAS NetBackup Software
Build a recovery CD to restore root file systems using VERITAS NetBackup software, without having to install the OS on an alternate boot disk or configure and use a Solaris JumpStart server. (Submitted by a BigAdmin reader.)
 
Introduction To Enterprise Java Bean(EJB). Developing web component.
Introduction To Enterprise Java Bean(EJB). Developing web component. Developing web component Introduction To Java Beans J2EE specification defines the structure of a J2EE application. According to the specification J2EE application consists of
 
10 Minutes Guide to Ant
10 Minutes Guide to Ant 10 Minutes Guide to Ant Previous Tutorial Index Next Introduction Well for the next 10 minutes get ready to devote to the ant guide. This will make some sence to the ant. Ant is a free tool under GNU Licence and is
 
Building Web Application With Ant and Deploying on Jboss 3.0
Building Web Application With Ant and Deploying on Jboss 3.0 Building Web Application With Ant and Deploying on Jboss 3.0 Previous Tutorial Index Next In this lesson I will show you how to build you web application and install on the Jboss 3.0
 
Installing Sun JDK on Linux
Installing Sun JDK on Linux Installing Sun JDK on Linux (Fedora Core 3) Downloading Download the latest version of JDK from http://www.java.sun.com . I have downloaded jdk-1_5_0_01-linux-i586.bin for this tutorial. Installing Change to the
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.