docs/src/get-property.md

Sun, 17 Dec 2023 15:33:50 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 17 Dec 2023 15:33:50 +0100
changeset 800
30d484806c2b
parent 408
f71eab18ed38
permissions
-rw-r--r--

fix faulty string to int conversion utilities

Probably it was expected that errno is set to EINVAL when illegal characters are encountered. But this is not standard and does not happen on every system, allowing illegal strings to be parsed as valid integers.

---
title: 'dav get-property'
---

**`dav get-property [-pcx] [-n <uri>] <url> <property>`**

Gets a specific resource property. Every WebDAV property has a name and an XML namespace. A namespace can be specified with the `-n` option or with a prefixed name. The prefix and property name are separated by a **:** as usual.

If the **`-x`** option is specified, a valid xml document containing the value is printed on stdout.

If the property contains xml data and the **`-x`** option is not specified, the value is printed on stderr in an xml-like format.

Example: `D:creationdate`

`D` is the prefix, `creationdate` is the name.

There are only two available prefixes by default:

1. `D` for the `DAV:` namespace
2. `idav` for `http://davutils.org/`

To use another namespace, use the `-n` option or configure a namespace in the [config.xml][1] file.

If the property name has no prefix, and no namespace is specified, the default namespace `DAV:` is used.

**`-p`** disable file name and path decryption if enabled

**`-c`** enable file name and path decryption

**`-x`** prints property as xml

**`-n <uri>`** specify property namespace

**Note:** Properties are never encrypted.

### Example: xml property

	$ dav get-property -x myserv/collection/ resourcetype
	<?xml version="1.0"?>
	<x0:resourcetype xmlns:x0="DAV:"><x0:collection /></x0:resourcetype>

[1]: ./configuration.html

mercurial