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 StringDirectory separatorstatic final charDirectory 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 TypeMethodDescriptionbooleancanRead()booleancanWrite()intbooleanstatic FilecreateTempFile(String prefix, String suffix) todostatic FilecreateTempFile(String prefix, String suffix, File directory) todobooleandelete()voidbooleanbooleanexists()getName()getPass()getPath()getUser()inthashCode()booleanbooleanbooleanisFile()booleanisHidden()longlonglength()String[]list()String[]list(FilenameFilter filter) File[]File[]listFiles(FileFilter filter) File[]listFiles(FilenameFilter filter) static File[]todobooleanmkdir()booleanmkdirs()booleanbooleansetLastModified(long time) booleantoString()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:
getParentFilein classFile
-
getPath
-
isAbsolute
public boolean isAbsolute()- Overrides:
isAbsolutein classFile
-
getAbsolutePath
- Overrides:
getAbsolutePathin classFile
-
getAbsoluteFile
- Overrides:
getAbsoluteFilein classFile
-
getCanonicalPath
- Overrides:
getCanonicalPathin classFile
-
getCanonicalFile
- Overrides:
getCanonicalFilein classFile
-
toURL
- Overrides:
toURLin classFile- Throws:
MalformedURLException
-
canRead
public boolean canRead() -
canWrite
public boolean canWrite() -
exists
public boolean exists() -
isDirectory
public boolean isDirectory()- Overrides:
isDirectoryin classFile
-
isFile
public boolean isFile() -
isHidden
public boolean isHidden() -
lastModified
public long lastModified()- Overrides:
lastModifiedin classFile
-
length
public long length() -
createNewFile
public boolean createNewFile()- Overrides:
createNewFilein classFile
-
delete
public boolean delete() -
deleteOnExit
public void deleteOnExit()- Overrides:
deleteOnExitin classFile
-
list
-
list
-
listFiles
-
listFiles
-
listFiles
-
mkdir
public boolean mkdir() -
mkdirs
public boolean mkdirs() -
renameTo
-
setLastModified
public boolean setLastModified(long time) - Overrides:
setLastModifiedin classFile
-
setReadOnly
public boolean setReadOnly()- Overrides:
setReadOnlyin classFile
-
listRoots
todo -
createTempFile
todo -
createTempFile
todo -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<File>- Overrides:
compareToin classFile
-
equals
-
hashCode
public int hashCode()
-