<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>check read write | Student Projects</title>
	<atom:link href="https://studentprojects.in/tag/check-read-write/feed/" rel="self" type="application/rss+xml" />
	<link>https://studentprojects.in</link>
	<description>Microcontroller projects, Circuit Diagrams, Project Ideas</description>
	<lastBuildDate>Fri, 02 Oct 2009 16:19:32 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.7</generator>
	<item>
		<title>Java program to display the information&#8217;s of the file</title>
		<link>https://studentprojects.in/software-development/java/java-programs/basic/java-program-to-display-the-informations-of-the-file/</link>
					<comments>https://studentprojects.in/software-development/java/java-programs/basic/java-program-to-display-the-informations-of-the-file/#comments</comments>
		
		<dc:creator><![CDATA[Editorial Team]]></dc:creator>
		<pubDate>Fri, 02 Oct 2009 16:19:32 +0000</pubDate>
				<category><![CDATA[Basic Programs]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[file reader]]></category>
		<category><![CDATA[check read write]]></category>
		<category><![CDATA[permissions of file]]></category>
		<category><![CDATA[file programing in java]]></category>
		<guid isPermaLink="false">http://studentprojects.in/?p=862</guid>

					<description><![CDATA[<p>Write a Java program that reads on file name from the user then displays information about whether the file exists,whether the file is readable,whether the file is writable,the type of the file and the length of the file in bytes</p>
<p>The post <a href="https://studentprojects.in/software-development/java/java-programs/basic/java-program-to-display-the-informations-of-the-file/">Java program to display the information’s of the file</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></description>
										<content:encoded><![CDATA[<p>Write a Java program that reads on file name from the user then displays information about whether the file exists, whether the file is readable, whether the file is writable, the type of the file and the length of the file in bytes</p>
<pre lang="java" escaped="true" line="1">
import java.util.Scanner;
import java.io.File;
class FileDemo
{
	public static void main(String[] args)
	{
		Scanner input=new Scanner(System.in);
		String s=input.nextLine();
		File f1=new File(s);	
		System.out.println("File Name:"+f1.getName());
		System.out.println("Path:"+f1.getPath());
		System.out.println("Abs Path:"+f1.getAbsolutePath());
		System.out.println("Parent:"+f1.getParent());
		System.out.println("This file is:"+(f1.exists()?"Exists":"Does not exists"));
		System.out.println("Is file:"+f1.isFile());
		System.out.println("Is Directory:"+f1.isDirectory());
		System.out.println("Is Readable:"+f1.canRead());
		System.out.println("IS Writable:"+f1.canWrite());
		System.out.println("Is Absolute:"+f1.isAbsolute());
		System.out.println("File Last Modified:"+f1.lastModified());
		System.out.println("File Size:"+f1.length()+"bytes");
		System.out.println("Is Hidden:"+f1.isHidden());
	}
}
</pre>
<p><strong>Output:</strong></p>
<p>Fibonacci.java<br />
File Name:Fibonacci.java<br />
Path: Fibonacci.java<br />
Abs Path: c:\sameer\Fibonacci.java<br />
Parent: Null<br />
This file is:Exists<br />
Is file:true<br />
Is Directory:false<br />
Is Readable:true<br />
Is Writable:true<br />
Is Absolute:false<br />
File Last Modified:1206324301937<br />
File Size: 406 bytes<br />
Is Hidden:false</p><p>The post <a href="https://studentprojects.in/software-development/java/java-programs/basic/java-program-to-display-the-informations-of-the-file/">Java program to display the information’s of the file</a> first appeared on <a href="https://studentprojects.in">Student Projects</a>.</p>]]></content:encoded>
					
					<wfw:commentRss>https://studentprojects.in/software-development/java/java-programs/basic/java-program-to-display-the-informations-of-the-file/feed/</wfw:commentRss>
			<slash:comments>5</slash:comments>
		
		
			</item>
	</channel>
</rss>
