Namespace: ITHit.WebDAV.Server
When you inherit from the DavContext class, you must override this abstract method. For WebDAV Class 1 and Class 2 server in this method implementation you will search for file or folder in your storage by path provided and return it to WebDAV engine. For DeltaV server in addition to folder or file item you will return version and history items.
The code below is part of 'WebDAVServer.NtfsStorage' sample provided with the SDK.
public override IHierarchyItem GetHierarchyItem(string path) { path = path.Trim(new[] { ' ', '/' }); //remove query string. int ind = path.IndexOf('?'); if (ind > -1) { path = path.Remove(ind); } IHierarchyItem item = null; item = DavFolder.GetFolder(this, path); if (item != null) return item; item = DavFile.GetFile(this, path); if (item != null) return item; logger.LogDebug("Could not find item that corresponds to path: " + path); return null; // no hierarchy item that corresponds to path parameter was found in the repository }