Package org.apache.webdav.lib
Class WebdavFile
java.lang.Object
java.io.File
org.apache.webdav.lib.WebdavFile
- All Implemented Interfaces:
Serializable
,Comparable<File>
Implements a file for WebDav
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Directory separatorstatic final char
Directory separatorFields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
-
Constructor Summary
ConstructorsConstructorDescriptionWebdavFile
(String aPath) A WebdavFile with a relative file.WebdavFile
(String pathname, String user, String pass) WebdavFile
(String parent, String child, String user, String pass) WebdavFile
(URL url, String user, String pass) WebdavFile
(org.apache.commons.httpclient.HttpURL httpUrl) WebdavFile
(WebdavFile parent, String child) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canRead()
boolean
canWrite()
int
boolean
static File
createTempFile
(String prefix, String suffix) todostatic File
createTempFile
(String prefix, String suffix, File directory) todoboolean
delete()
void
boolean
boolean
exists()
getName()
getPass()
getPath()
getUser()
int
hashCode()
boolean
boolean
boolean
isFile()
boolean
isHidden()
long
long
length()
String[]
list()
String[]
list
(FilenameFilter filter) File[]
File[]
listFiles
(FileFilter filter) File[]
listFiles
(FilenameFilter filter) static File[]
todoboolean
mkdir()
boolean
mkdirs()
boolean
boolean
setLastModified
(long time) boolean
toString()
toURL()
Methods inherited from class java.io.File
canExecute, getFreeSpace, getTotalSpace, getUsableSpace, setExecutable, setExecutable, setReadable, setReadable, setWritable, setWritable, toPath, toURI
-
Field Details
-
davSeparatorChar
public static final char davSeparatorCharDirectory separator- See Also:
-
davSeparator
Directory separator
-
-
Constructor Details
-
WebdavFile
public WebdavFile(WebdavFile parent, String child) throws org.apache.commons.httpclient.URIException - Parameters:
parent
- directorychild
- element in parent- Throws:
org.apache.commons.httpclient.URIException
-
WebdavFile
public WebdavFile(String pathname, String user, String pass) throws org.apache.commons.httpclient.URIException - Parameters:
pathname
- complete path to elementuser
- user namepass
- password- Throws:
org.apache.commons.httpclient.URIException
-
WebdavFile
public WebdavFile(URL url, String user, String pass) throws org.apache.commons.httpclient.URIException - Parameters:
url
- file urluser
- user namepass
- password- Throws:
org.apache.commons.httpclient.URIException
-
WebdavFile
public WebdavFile(String parent, String child, String user, String pass) throws org.apache.commons.httpclient.URIException - Parameters:
parent
- parent namechild
- name of element in parentuser
- user namepass
- password- Throws:
org.apache.commons.httpclient.URIException
-
WebdavFile
public WebdavFile(org.apache.commons.httpclient.HttpURL httpUrl) throws org.apache.commons.httpclient.URIException - Parameters:
httpUrl
- Webdav URL- Throws:
org.apache.commons.httpclient.URIException
-
WebdavFile
A WebdavFile with a relative file. Hence nobody keeps track of a "working directory" the resulting object is only a container for a String (pathname). You cannot do anything usefull with an instance created this way
-
-
Method Details
-
getUser
- Throws:
org.apache.commons.httpclient.URIException
-
getPass
- Throws:
org.apache.commons.httpclient.URIException
-
getName
-
getParent
-
getParentFile
- Overrides:
getParentFile
in classFile
-
getPath
-
isAbsolute
public boolean isAbsolute()- Overrides:
isAbsolute
in classFile
-
getAbsolutePath
- Overrides:
getAbsolutePath
in classFile
-
getAbsoluteFile
- Overrides:
getAbsoluteFile
in classFile
-
getCanonicalPath
- Overrides:
getCanonicalPath
in classFile
-
getCanonicalFile
- Overrides:
getCanonicalFile
in classFile
-
toURL
- Overrides:
toURL
in classFile
- Throws:
MalformedURLException
-
canRead
public boolean canRead() -
canWrite
public boolean canWrite() -
exists
public boolean exists() -
isDirectory
public boolean isDirectory()- Overrides:
isDirectory
in classFile
-
isFile
public boolean isFile() -
isHidden
public boolean isHidden() -
lastModified
public long lastModified()- Overrides:
lastModified
in classFile
-
length
public long length() -
createNewFile
public boolean createNewFile()- Overrides:
createNewFile
in classFile
-
delete
public boolean delete() -
deleteOnExit
public void deleteOnExit()- Overrides:
deleteOnExit
in classFile
-
list
-
list
-
listFiles
-
listFiles
-
listFiles
-
mkdir
public boolean mkdir() -
mkdirs
public boolean mkdirs() -
renameTo
-
setLastModified
public boolean setLastModified(long time) - Overrides:
setLastModified
in classFile
-
setReadOnly
public boolean setReadOnly()- Overrides:
setReadOnly
in classFile
-
listRoots
todo -
createTempFile
todo -
createTempFile
todo -
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<File>
- Overrides:
compareTo
in classFile
-
equals
-
hashCode
public int hashCode()
-