1

I am writing something in PHP to create a virtual file system using WebDAV.

I am trying to get my head around the PROPFIND request method. RFC 4918 mentions something about it, but I’m not sure I understand. Can someone clarify this:

What is the role of the Depth value (0, 1, infinity)? Has it something to do with folders vs files?

Thanks

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
Manngo
  • 14,066
  • 10
  • 88
  • 110

1 Answers1

3

What is the role of the Depth value (0, 1, infinity)? Has it something to do with folders vs files?

For directories:

  • Depth 0: Retrieve properties of the directory
  • Depth 1: as 0 + properties of all files in the directory
  • Depth infinity: as 1 + properties of all files in sub-directories of the directory (recursively)

For files it has no effect.

The depth applies similarly to other WebDAV methods.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992