Class FileExplorerOperations
Class FileExplorerOperations used to perform file operations in underlying machine's physical file system.
Inherited Members
Namespace: Syncfusion.JavaScript
Assembly: Syncfusion.EJ.dll
Syntax
public class FileExplorerOperations : BasicFileOperations
Constructors
FileExplorerOperations()
Declaration
public FileExplorerOperations()
FileExplorerOperations(String)
Declaration
public FileExplorerOperations(string ContentRootPath)
Parameters
Type | Name | Description |
---|---|---|
System.String | ContentRootPath |
Methods
CreateFolder(String, String, IEnumerable<Object>)
Creates a new folder in given path with specified name.
Declaration
public override object CreateFolder(string path, string name, IEnumerable<object> selectedItems = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Parent folder path. |
System.String | name | Name of the new folder. |
System.Collections.Generic.IEnumerable<System.Object> | selectedItems | Details about selected items. |
Returns
Type | Description |
---|---|
System.Object | System.Object. |
Overrides
Download(String, String[], IEnumerable<Object>)
Downloads the specified files.
Declaration
public override void Download(string path, string[] names, IEnumerable<object> selectedItems = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Parent directory path of selected files, which is going to be download. |
System.String[] | names | Name of files that is need to be downloaded. |
System.Collections.Generic.IEnumerable<System.Object> | selectedItems | Details about selected items. |
Overrides
GetAllFileDetails(String, String[])
Gets the details of all files and folders.
Declaration
public FileExplorerDirectoryContent[] GetAllFileDetails(string path, string[] names)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The parent directory path. |
System.String[] | names | The file/ folder names. |
Returns
Type | Description |
---|---|
FileExplorerDirectoryContent[] | FileExplorerDirectoryContent[]. |
GetDetails(String, String[], IEnumerable<Object>)
Gets the details about specified file or directory.
Declaration
public override object GetDetails(string path, string[] names, IEnumerable<object> selectedItems = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Parent directory path of selected file. |
System.String[] | names | File or folder name. |
System.Collections.Generic.IEnumerable<System.Object> | selectedItems | Details about selected items. |
Returns
Type | Description |
---|---|
System.Object | System.Object. |
Overrides
GetFileDetails(String)
Gets the details of file /folder.
Declaration
public FileExplorerDirectoryContent GetFileDetails(string path)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | The item path. |
Returns
Type | Description |
---|---|
FileExplorerDirectoryContent | FileExplorerDirectoryContent. |
GetImage(String, Boolean, ImageSize, IEnumerable<Object>)
Declaration
public override void GetImage(string path, bool canCompress = false, ImageSize size = null, IEnumerable<object> selectedItems = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | |
System.Boolean | canCompress | |
ImageSize | size | |
System.Collections.Generic.IEnumerable<System.Object> | selectedItems |
Overrides
GetImage(String, IEnumerable<Object>)
Gets the image.
Declaration
public override void GetImage(string path, IEnumerable<object> selectedItems = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | File path. |
System.Collections.Generic.IEnumerable<System.Object> | selectedItems | Details about selected items. |
Overrides
Paste(String, String, String[], String, IEnumerable<CommonFileDetails>, IEnumerable<Object>, IEnumerable<Object>)
Copy or moves the specified files/ directories from one location to another location.
Declaration
public override object Paste(string sourceDir, string backupDir, string[] names, string option, IEnumerable<CommonFileDetails> commonFiles, IEnumerable<object> selectedItems = null, IEnumerable<object> targetFolder = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | sourceDir | The source directory path. |
System.String | backupDir | |
System.String[] | names | Name of file/ folders, which are going to be pasted in destination folder. |
System.String | option | Operation type “move” or “copy”. |
System.Collections.Generic.IEnumerable<CommonFileDetails> | commonFiles | Existing files list, which contains same name, type and parent path as given in new file. |
System.Collections.Generic.IEnumerable<System.Object> | selectedItems | Details about selected items. |
System.Collections.Generic.IEnumerable<System.Object> | targetFolder | Details about target folder. |
Returns
Type | Description |
---|---|
System.Object | System.Object. |
Overrides
Read(String, String, IEnumerable<Object>)
Reads all immediate files and sub-folders from the specified path and it returns the matched type of files, which are specified in “filter” parameter.
Declaration
public override object Read(string path, string filter, IEnumerable<object> selectedItems = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Path of the selected folder. |
System.String | filter | File types to filter. |
System.Collections.Generic.IEnumerable<System.Object> | selectedItems | Details about selected items. |
Returns
Type | Description |
---|---|
System.Object | System.Object. |
Overrides
ReadSharedDrive(String)
Declaration
public virtual object ReadSharedDrive(string serverName)
Parameters
Type | Name | Description |
---|---|---|
System.String | serverName |
Returns
Type | Description |
---|---|
System.Object |
Remove(String[], String, IEnumerable<Object>)
Removes the specified items from given path.
Declaration
public override object Remove(string[] names, string path, IEnumerable<object> selectedItems = null)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | names | Removable item names. |
System.String | path | Parent folder path of removable items. |
System.Collections.Generic.IEnumerable<System.Object> | selectedItems | Details about selected items. |
Returns
Type | Description |
---|---|
System.Object | System.Object. |
Overrides
Rename(String, String, String, IEnumerable<CommonFileDetails>, IEnumerable<Object>)
Renames the specified file/folder, which is available in given path.
Declaration
public override object Rename(string path, string oldName, string newName, IEnumerable<CommonFileDetails> commonFiles, IEnumerable<object> selectedItems = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Parent folder path of renaming item. |
System.String | oldName | Existing name. |
System.String | newName | New name. |
System.Collections.Generic.IEnumerable<CommonFileDetails> | commonFiles | Specifies existing files list, which contains same name, type and parent path as given in new file |
System.Collections.Generic.IEnumerable<System.Object> | selectedItems | Details about selected items. |
Returns
Type | Description |
---|---|
System.Object | System.Object. |
Overrides
Search(String, String, String, Boolean, IEnumerable<Object>)
Searches the matched files and sub-folders in the given folder path using search string.
Declaration
public override object Search(string path, string filter, string searchString, bool caseSensitive, IEnumerable<object> selectedItems = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | Directory path. |
System.String | filter | File types to filter. |
System.String | searchString | The search string. |
System.Boolean | caseSensitive | If set to |
System.Collections.Generic.IEnumerable<System.Object> | selectedItems | Details about selected items. |
Returns
Type | Description |
---|---|
System.Object | System.Object. |
Overrides
SearchSharedDrive(String, String, Boolean)
Declaration
public virtual object SearchSharedDrive(string serverName, string searchString, bool caseSensitive)
Parameters
Type | Name | Description |
---|---|---|
System.String | serverName | |
System.String | searchString | |
System.Boolean | caseSensitive |
Returns
Type | Description |
---|---|
System.Object |
Upload(IEnumerable<HttpPostedFileBase>, String, IEnumerable<Object>)
Uploads the specified files to given path.
Declaration
public override void Upload(IEnumerable<HttpPostedFileBase> files, string path, IEnumerable<object> selectedItems = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Web.HttpPostedFileBase> | files | Uploading file details. |
System.String | path | Path of destination directory, where the files need to be uploaded. |
System.Collections.Generic.IEnumerable<System.Object> | selectedItems | Details about selected items. |