case "read":
// reads the file(s) or folder(s) from the given path.
//return this.operation.ToCamelCase(this.operation.GetFiles(args.Path,
args.ShowHiddenItems));
FileManagerResponse readResult = this.operation.GetFiles(args.Path,
args.ShowHiddenItems);
List newFiles = new
List();
foreach (FileManagerDirectoryContent file in readResult.Files)
{
if ((file.Type == ""))
{
newFiles.Add(file);
}
}
readResult.Files = newFiles;
return Json(operation.ToCamelCase(readResult));
case "search":
// gets the list of file(s) or folder(s) from a given path based on the
searched key string.
//return this.operation.ToCamelCase(this.operation.Search(args.Path,
args.SearchString, args.ShowHiddenItems, args.CaseSensitive));
FileManagerResponse searchResult = this.operation.Search(args.Path,
args.SearchString, args.ShowHiddenItems, args.CaseSensitive);
List new_searchFiles = new
List();
foreach (FileManagerDirectoryContent file in searchResult.Files)
{
if ((file.Type == ""))
{
new_searchFiles.Add(file);
}
}
searchResult.Files = new_searchFiles;
return Json(this.operation.ToCamelCase(searchResult)); |