org.apache.webdav.lib

Class WebdavFile


public class WebdavFile
extends File

Implements a file for WebDav

Field Summary

static String
davSeparator
Directory separator
static char
davSeparatorChar
Directory separator

Constructor Summary

WebdavFile(HttpURL httpUrl)
WebdavFile(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(WebdavFile parent, String child)

Method Summary

boolean
canRead()
boolean
canWrite()
int
compareTo(File pathname)
int
compareTo(Object o)
boolean
createNewFile()
static File
createTempFile(String prefix, String suffix)
todo
static File
createTempFile(String prefix, String suffix, File directory)
todo
boolean
delete()
void
deleteOnExit()
boolean
equals(Object x)
boolean
exists()
File
getAbsoluteFile()
String
getAbsolutePath()
File
getCanonicalFile()
String
getCanonicalPath()
String
getName()
String
getParent()
File
getParentFile()
String
getPass()
String
getPath()
String
getUser()
int
hashCode()
boolean
isAbsolute()
boolean
isDirectory()
boolean
isFile()
boolean
isHidden()
long
lastModified()
long
length()
String[]
list()
String[]
list(FilenameFilter filter)
File[]
listFiles()
File[]
listFiles(FileFilter filter)
File[]
listFiles(FilenameFilter filter)
static File[]
listRoots()
todo
boolean
mkdir()
boolean
mkdirs()
boolean
renameTo(File dest)
boolean
setLastModified(long time)
boolean
setReadOnly()
String
toString()
URL
toURL()

Field Details

davSeparator

public static final String davSeparator
Directory separator

davSeparatorChar

public static final char davSeparatorChar
Directory separator
Field Value:
'/'

Constructor Details

WebdavFile

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

WebdavFile

public WebdavFile(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

WebdavFile

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

WebdavFile

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

WebdavFile

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

WebdavFile

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

Method Details

canRead

public boolean canRead()

canWrite

public boolean canWrite()

compareTo

public int compareTo(File pathname)

compareTo

public int compareTo(Object o)

createNewFile

public boolean createNewFile()

createTempFile

public static File createTempFile(String prefix,
                                  String suffix)
todo

createTempFile

public static File createTempFile(String prefix,
                                  String suffix,
                                  File directory)
todo

delete

public boolean delete()

deleteOnExit

public void deleteOnExit()

equals

public boolean equals(Object x)

exists

public boolean exists()

getAbsoluteFile

public File getAbsoluteFile()

getAbsolutePath

public String getAbsolutePath()

getCanonicalFile

public File getCanonicalFile()

getCanonicalPath

public String getCanonicalPath()

getName

public String getName()

getParent

public String getParent()

getParentFile

public File getParentFile()

getPass

public String getPass()
            throws URIException

getPath

public String getPath()

getUser

public String getUser()
            throws URIException

hashCode

public int hashCode()

isAbsolute

public boolean isAbsolute()

isDirectory

public boolean isDirectory()

isFile

public boolean isFile()

isHidden

public boolean isHidden()

lastModified

public long lastModified()

length

public long length()

list

public String[] list()

list

public String[] list(FilenameFilter filter)

listFiles

public File[] listFiles()

listFiles

public File[] listFiles(FileFilter filter)

listFiles

public File[] listFiles(FilenameFilter filter)

listRoots

public static File[] listRoots()
todo

mkdir

public boolean mkdir()

mkdirs

public boolean mkdirs()

renameTo

public boolean renameTo(File dest)

setLastModified

public boolean setLastModified(long time)

setReadOnly

public boolean setReadOnly()

toString

public String toString()

toURL

public URL toURL()
            throws MalformedURLException