Hi,
fs_dav_provider.FileResource is class derived from
dav_provider.DAVResource class.
dav_provider.DAVResource.getPropertyValue use getDisplayName method to
return the file name displayed.
Regards,
Stephane
def getDisplayName(self):
return self.name
in the standard fs_dav_provider.py (line 108-109) file (directly in
the python site-package folder for testing purposes) to:
def getDisplayName(self):
print "XXX"
return "X-" + self.name
didn't show any file starting with "X-" nor did the print statement
get called ever.
That was the problem. Somehow getPropertyValue doesn't call
getDiaplyName in fs_dav_provider.py.
Regards,
Bernhard
getDisplayName() defines the value of the '{DAV:}displayname'
property.
You can see it with clients like DAVExplorer. It's also used by the
dir_browser module to render the directory listings.
In contrast the 'name' of a resource is used to create the URLs.
WebDAV clients like Windows File Explorer display the resource names
as file or directory names.
The name is stored as Resource.name attribute, and initialized in teh
Resource contructor.
If you want to change it, you also have to make sure that the URL-to-
resource mapping is resolved.
This can be done by modifying Provider.getResourceInst()
The samples (hg_dav_provider.py, virtual_dav_provider.py,
mysql_dav_provider.py) may give an idea.
Hope this helps
Martin