org.apache.webdav.lib
Class WebdavFile

java.lang.Object
  extended byjava.io.File
      extended byorg.apache.webdav.lib.WebdavFile
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class WebdavFile
extends java.io.File

Implements a file for WebDav

See Also:
Serialized Form

Field Summary
static java.lang.String davSeparator
          Directory separator
static char davSeparatorChar
          Directory separator
 
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
 
Constructor Summary
WebdavFile(HttpURL httpUrl)
           
WebdavFile(java.lang.String aPath)
          A WebdavFile with a relative file.
WebdavFile(java.lang.String pathname, java.lang.String user, java.lang.String pass)
           
WebdavFile(java.lang.String parent, java.lang.String child, java.lang.String user, java.lang.String pass)
           
WebdavFile(java.net.URL url, java.lang.String user, java.lang.String pass)
           
WebdavFile(WebdavFile parent, java.lang.String child)
           
 
Method Summary
 boolean canRead()
           
 boolean canWrite()
           
 int compareTo(java.io.File pathname)
           
 int compareTo(java.lang.Object o)
           
 boolean createNewFile()
           
static java.io.File createTempFile(java.lang.String prefix, java.lang.String suffix)
          todo
static java.io.File createTempFile(java.lang.String prefix, java.lang.String suffix, java.io.File directory)
          todo
 boolean delete()
           
 void deleteOnExit()
           
 boolean equals(java.lang.Object x)
           
 boolean exists()
           
 java.io.File getAbsoluteFile()
           
 java.lang.String getAbsolutePath()
           
 java.io.File getCanonicalFile()
           
 java.lang.String getCanonicalPath()
           
 java.lang.String getName()
           
 java.lang.String getParent()
           
 java.io.File getParentFile()
           
 java.lang.String getPass()
           
 java.lang.String getPath()
           
 java.lang.String getUser()
           
 int hashCode()
           
 boolean isAbsolute()
           
 boolean isDirectory()
           
 boolean isFile()
           
 boolean isHidden()
           
 long lastModified()
           
 long length()
           
 java.lang.String[] list()
           
 java.lang.String[] list(java.io.FilenameFilter filter)
           
 java.io.File[] listFiles()
           
 java.io.File[] listFiles(java.io.FileFilter filter)
           
 java.io.File[] listFiles(java.io.FilenameFilter filter)
           
static java.io.File[] listRoots()
          todo
 boolean mkdir()
           
 boolean mkdirs()
           
 boolean renameTo(java.io.File dest)
           
 boolean setLastModified(long time)
           
 boolean setReadOnly()
           
 java.lang.String toString()
           
 java.net.URL toURL()
           
 
Methods inherited from class java.io.File
toURI
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

davSeparatorChar

public static final char davSeparatorChar
Directory separator

See Also:
Constant Field Values

davSeparator

public static final java.lang.String davSeparator
Directory separator

Constructor Detail

WebdavFile

public WebdavFile(WebdavFile parent,
                  java.lang.String child)
           throws URIException
Parameters:
parent - directory
child - element in parent

WebdavFile

public WebdavFile(java.lang.String pathname,
                  java.lang.String user,
                  java.lang.String pass)
           throws URIException
Parameters:
pathname - complete path to element
user - user name
pass - password

WebdavFile

public WebdavFile(java.net.URL url,
                  java.lang.String user,
                  java.lang.String pass)
           throws URIException
Parameters:
url - file url
user - user name
pass - password

WebdavFile

public WebdavFile(java.lang.String parent,
                  java.lang.String child,
                  java.lang.String user,
                  java.lang.String pass)
           throws URIException
Parameters:
parent - parent name
child - name of element in parent
user - user name
pass - password

WebdavFile

public WebdavFile(HttpURL httpUrl)
           throws URIException
Parameters:
httpUrl - Webdav URL

WebdavFile

public WebdavFile(java.lang.String aPath)
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 Detail

getUser

public java.lang.String getUser()
                         throws URIException
Throws:
URIException

getPass

public java.lang.String getPass()
                         throws URIException
Throws:
URIException

getName

public java.lang.String getName()

getParent

public java.lang.String getParent()

getParentFile

public java.io.File getParentFile()

getPath

public java.lang.String getPath()

isAbsolute

public boolean isAbsolute()

getAbsolutePath

public java.lang.String getAbsolutePath()

getAbsoluteFile

public java.io.File getAbsoluteFile()

getCanonicalPath

public java.lang.String getCanonicalPath()

getCanonicalFile

public java.io.File getCanonicalFile()

toURL

public java.net.URL toURL()
                   throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

canRead

public boolean canRead()

canWrite

public boolean canWrite()

exists

public boolean exists()

isDirectory

public boolean isDirectory()

isFile

public boolean isFile()

isHidden

public boolean isHidden()

lastModified

public long lastModified()

length

public long length()

createNewFile

public boolean createNewFile()

delete

public boolean delete()

deleteOnExit

public void deleteOnExit()

list

public java.lang.String[] list()

list

public java.lang.String[] list(java.io.FilenameFilter filter)

listFiles

public java.io.File[] listFiles()

listFiles

public java.io.File[] listFiles(java.io.FilenameFilter filter)

listFiles

public java.io.File[] listFiles(java.io.FileFilter filter)

mkdir

public boolean mkdir()

mkdirs

public boolean mkdirs()

renameTo

public boolean renameTo(java.io.File dest)

setLastModified

public boolean setLastModified(long time)

setReadOnly

public boolean setReadOnly()

listRoots

public static java.io.File[] listRoots()
todo


createTempFile

public static java.io.File createTempFile(java.lang.String prefix,
                                          java.lang.String suffix,
                                          java.io.File directory)
todo


createTempFile

public static java.io.File createTempFile(java.lang.String prefix,
                                          java.lang.String suffix)
todo


toString

public java.lang.String toString()

compareTo

public int compareTo(java.io.File pathname)

compareTo

public int compareTo(java.lang.Object o)

equals

public boolean equals(java.lang.Object x)

hashCode

public int hashCode()