|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.finj.RemoteFile
public class RemoteFile
Class inspired on java.io.File
, that represents
files located on a distant computer. Note that instances of
this class are non-mutable objects.
Copyright (C) 2000-2008 Javier Iglesias.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Constructor Summary | |
---|---|
RemoteFile(java.lang.String path,
java.lang.String name,
boolean canRead,
boolean canWrite,
boolean isDir,
boolean isHidden,
long lastMod,
long size)
|
Method Summary | |
---|---|
boolean |
canRead()
Returns true if file can be read. |
boolean |
canWrite()
Returns true if file can be written to. |
java.lang.String |
getName()
Returns the name of the file. |
java.lang.String |
getParent()
Returns parent path if it exists, null if not. |
java.lang.String |
getPath()
Returns path to this file on the distant computer. |
boolean |
isDirectory()
Returns true if path points to a directory, false else. |
boolean |
isFile()
Returns true if path points to a file, false else. |
boolean |
isHidden()
Tests whether the file named by this abstract pathname is a hidden file. |
long |
lastModified()
Returns the time that the file was last modified, measured in milliseconds since 1970/01/01. |
long |
size()
Returns the length of the file in bytes. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RemoteFile(java.lang.String path, java.lang.String name, boolean canRead, boolean canWrite, boolean isDir, boolean isHidden, long lastMod, long size)
Method Detail |
---|
public java.lang.String getName()
public java.lang.String getParent()
null
if not.
null
else.public java.lang.String getPath()
public boolean canRead()
true
if file can be read.
true
if file might be readable,
false
when it surely isn't.public boolean canWrite()
true
if file can be written to.
true
if file might be writable,
false
when it surely isn't.public boolean isDirectory()
true
if file is a directory,
false
else.public boolean isFile()
true
if file is a file,
false
else.public boolean isHidden()
true
if file is hidden,
false
else.public long lastModified()
public long size()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |