Liking cljdoc? Tell your friends :D
Clojure only.

dk.simongray.webdav.files

A backend over a directory of the file system, on the JVM.

A path below the root of the share is the file or directory of the same path below the directory. The backend keeps what it needs of its own in a directory named .webdav at the top, which no request reaches and no listing shows:

  • props, the dead properties of each resource as an XML file, in a tree that mirrors the share, e.g. props/notes.d/a.txt.xml for notes/a.txt, and root-props.xml beside it for the root's
  • tmp, the bodies of PUTs while they're written

A PUT is written to a file in tmp and then moved into place, so a body that's refused or broken off changes nothing. A MOVE renames the file or the directory, properties and all, and a COPY goes through the handler's own copying. A new name can be 251 bytes long, so that its properties' file fits beside it.

An ETag is the size, the time of the last change and the inode of a file, where the file system has inodes. Each PUT makes a new file, so its ETag differs from the last one even within one tick of the clock.

Some paths count as nothing there, nor what's below them:

  • a symbolic link, wherever it leads, and a FIFO or a device
  • the backend's own directory by any name
  • a name that the file system takes for another, e.g. A.txt for a.txt on one that ignores case, as macOS's does, so a MOVE can't rename a file by its case alone

One process serves a directory, and nobody else writes to it, since a local user who swaps a directory for a link while a request is under way can make the backend write where the link leads.

A backend over a directory of the file system, on the JVM.

A path below the root of the share is the file or directory of the same
path below the directory. The backend keeps what it needs of its own in
a directory named .webdav at the top, which no request reaches and no
listing shows:

- props, the dead properties of each resource as an XML file, in a tree
  that mirrors the share, e.g. props/notes.d/a.txt.xml for notes/a.txt,
  and root-props.xml beside it for the root's
- tmp, the bodies of PUTs while they're written

A PUT is written to a file in tmp and then moved into place, so a body
that's refused or broken off changes nothing. A MOVE renames the file or
the directory, properties and all, and a COPY goes through the handler's
own copying. A new name can be 251 bytes long, so that its properties'
file fits beside it.

An ETag is the size, the time of the last change and the inode of a
file, where the file system has inodes. Each PUT makes a new file, so
its ETag differs from the last one even within one tick of the clock.

Some paths count as nothing there, nor what's below them:

- a symbolic link, wherever it leads, and a FIFO or a device
- the backend's own directory by any name
- a name that the file system takes for another, e.g. A.txt for a.txt
  on one that ignores case, as macOS's does, so a MOVE can't rename a
  file by its case alone

One process serves a directory, and nobody else writes to it, since a
local user who swaps a directory for a link while a request is under
way can make the backend write where the link leads.
raw docstring

backendclj

(backend dir)
(backend dir
         {:keys [namespaces content-type]
          :or {content-type (fn* [p1__5294#]
                                 (URLConnection/guessContentTypeFromName
                                   p1__5294#))}
          :as opts})

A backend over the directory dir (a path or a File), which must be there, with the opts below:

  • :namespaces, the aliases of namespaces in property names, the same as the handler's
  • :content-type, a function of a file's name that returns its media type or nil, by default URLConnection's guess from its extension

It has every function of a backend but :copy!.

A backend over the directory `dir` (a path or a File), which must be
there, with the `opts` below:

- :namespaces, the aliases of namespaces in property names, the same as
  the handler's
- :content-type, a function of a file's name that returns its media
  type or nil, by default URLConnection's guess from its extension

It has every function of a backend but :copy!.
sourceraw docstring

own-dirclj

The name of the directory at the top of the share that the backend keeps for itself.

The name of the directory at the top of the share that the backend
keeps for itself.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close