let fileObject: FileManager = new FileManager({
detailsViewSettings: {
columns: [
{
field: "name", headerText: "File Name", minWidth: 120, width: "100",
},
{
field: "size", headerText: "File Size", minWidth: 50, width: "110"
},
{ field: 'dateModified', headerText: 'Date Modified',minWidth: 50, width: '190'},
{ field: 'dateCreated', headerText: 'Date Created',minWidth: 50, width: '190'},
{ field: "author", headerText: "Author", minWidth: 50, width: '190' }
]
}
});
fileObject.appendTo("#filemanager");
|
public object getFiles(FileManagerDirectoryContent args)
{
FileResponse readResponse = new FileResponse();
try
{
var value = this.operation.GetFiles(args.Path, args.ShowHiddenItems);
DirectoryContent cwd = new DirectoryContent();
readResponse.CWD = JsonConvert.DeserializeObject<DirectoryContent>(JsonConvert.SerializeObject(value.CWD));
readResponse.Files = JsonConvert.DeserializeObject<IEnumerable<DirectoryContent>>(JsonConvert.SerializeObject(value.Files));
foreach (DirectoryContent file in readResponse.Files)
{
//Get the value of author
file.Author = args.IsFile ? "File" : "Syncfusion";
}
readResponse.Details = value.Details;
readResponse.Error = value.Error;
return readResponse;
}
catch
{
ErrorDetails er = new ErrorDetails();
}
return this.operation.ToCamelCase(this.operation.GetFiles(args.Path, args.ShowHiddenItems));
}
case "read":
// reads the file(s) or folder(s) from the given path.
return this.getFiles(args); |