webdav portal search view added

This commit is contained in:
vfedosevich 2015-03-03 06:41:52 -08:00
parent 839f6cda2b
commit 0ebe24141e
24 changed files with 345 additions and 99 deletions

View file

@ -3,7 +3,7 @@ using System.Linq;
namespace WebsitePanel.WebDav.Core.Extensions
{
static class UriExtensions
public static class UriExtensions
{
public static Uri Append(this Uri uri, params string[] paths)
{

View file

@ -9,6 +9,7 @@ namespace WebsitePanel.WebDav.Core
long ContentLength { get; }
long AllocatedSpace { get; set; }
string ContentType { get; }
string Summary { get; set; }
void Download(string filename);
byte[] Download();

View file

@ -89,6 +89,8 @@ namespace WebsitePanel.WebDav.Core
}
}
public string Summary { get; set; }
/// <summary>
/// Downloads content of the resource to a file specified by filename
/// </summary>

View file

@ -19,5 +19,6 @@ namespace WebsitePanel.WebDav.Core.Interfaces.Managers
string GetFileUrl(string path);
void DeleteResource(string path);
void LockFile(string path);
string GetFileFolderPath(string path);
}
}

View file

@ -103,7 +103,7 @@ namespace WebsitePanel.WebDav.Core.Managers
public bool IsFile(string path)
{
string folder = GetFileFolder(path);
string folder = GetFileFolderPath(path);
if (string.IsNullOrWhiteSpace(folder))
{
@ -124,7 +124,7 @@ namespace WebsitePanel.WebDav.Core.Managers
{
try
{
string folder = GetFileFolder(path);
string folder = GetFileFolderPath(path);
var resourceName = GetResourceName(path);
@ -212,7 +212,7 @@ namespace WebsitePanel.WebDav.Core.Managers
path = RemoveLeadingFromPath(path, "edit");
path = RemoveLeadingFromPath(path, WspContext.User.OrganizationId);
string folderPath = GetFileFolder(path);
string folderPath = GetFileFolderPath(path);
OpenFolder(folderPath);
@ -232,7 +232,7 @@ namespace WebsitePanel.WebDav.Core.Managers
{
try
{
string folder = GetFileFolder(path);
string folder = GetFileFolderPath(path);
var resourceName = GetResourceName(path);
@ -250,7 +250,7 @@ namespace WebsitePanel.WebDav.Core.Managers
{
try
{
string folder = GetFileFolder(path);
string folder = GetFileFolderPath(path);
var resourceName = GetResourceName(path);
@ -270,7 +270,7 @@ namespace WebsitePanel.WebDav.Core.Managers
{
try
{
string folder = GetFileFolder(path);
string folder = GetFileFolderPath(path);
var resourceName = GetResourceName(path);
@ -345,6 +345,7 @@ namespace WebsitePanel.WebDav.Core.Managers
webDavitem.SetLastModified(file.Changed);
webDavitem.ContentLength = file.Size;
webDavitem.AllocatedSpace = file.FRSMQuotaMB;
webDavitem.Summary = file.Summary;
convertResult.Add(webDavitem);
}
@ -372,7 +373,7 @@ namespace WebsitePanel.WebDav.Core.Managers
targetStream.Write(buffer, 0, n);
}
private string GetFileFolder(string path)
public string GetFileFolderPath(string path)
{
path = path.TrimEnd('/');