Class WebDAVFileInfo

Simple class representing a file on a remote WebDAV location. The class possesses only read-only attributes of the file and does not permit any manipulation of the file itself. Instances of this class are returned by WebDAVClient.propfind(String) which is used to get a listing of files in a WebDAV directory.

Note: when this class is used with sensitive data, be careful in persisting sensitive information to disk.

Property Summary 

PropertyDescription
contentType: String (read-only)Returns the content type of the file.
creationDate: Date (read-only)Returns the creationDate of the file.
directory: Boolean (read-only)Identifies if the file is a directory.
name: String (read-only)Returns the name of the file.
path: String (read-only)Returns the path of the file.
size: Number (read-only)Returns the size of the file.

Constructor Summary 

This class does not have a constructor, so you cannot create it directly.

Method Summary 

MethodDescription
getContentType()Returns the content type of the file.
getCreationDate()Returns the creationDate of the file.
getName()Returns the name of the file.
getPath()Returns the path of the file.
getSize()Returns the size of the file.
isDirectory()Identifies if the file is a directory.
lastModified()Returns the lastModified date of the file.

Methods inherited from class Object 

assign, create, create, defineProperties, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, hasOwnProperty, is, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, preventExtensions, propertyIsEnumerable, seal, setPrototypeOf, toLocaleString, toString, valueOf, values

Property Details 

contentType 

contentType: String (read-only)

Returns the content type of the file.


creationDate 

creationDate: Date (read-only)

Returns the creationDate of the file.


directory 

directory: Boolean (read-only)

Identifies if the file is a directory.


name 

name: String (read-only)

Returns the name of the file.


path 

path: String (read-only)

Returns the path of the file.


size 

size: Number (read-only)

Returns the size of the file.


Method Details 

getContentType() 

getContentType(): String

Returns the content type of the file.

Returns:

  • the content type of the file.

getCreationDate() 

getCreationDate(): Date

Returns the creationDate of the file.

Returns:

  • the creationDate of the file.

getName() 

getName(): String

Returns the name of the file.

Returns:

  • the name of the file.

getPath() 

getPath(): String

Returns the path of the file.

Returns:

  • the path of the file.

getSize() 

getSize(): Number

Returns the size of the file.

Returns:

  • the size of the file.

isDirectory() 

isDirectory(): Boolean

Identifies if the file is a directory.

Returns:

  • true if the file is a directory, false otherwise.

lastModified() 

lastModified(): Date

Returns the lastModified date of the file.

Returns:

  • the lastModified date of the file.

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!