Archive:Java File IO: Difference between revisions

wikademia>Wikademia
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:
<pre>f.exists()</pre>
<pre>f.exists()</pre>
This will return a boolean.
This will return a boolean.
 
{{ntnes}}
To check if it is a file or directory:
To check if it is a file or directory:
<pre>f.isFile()
<pre>f.isFile()