Tab

FileManagerFile.Folder Property

Gets the parent folder to which the current file belongs.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

Declaration

public FileManagerFolder Folder { get; }
Public ReadOnly Property Folder As FileManagerFolder

Property Value

Type Description
FileManagerFolder

A FileManagerFolder object representing the file's immediate parent.

Available values:

Show 14 items
Name Description
Permissions

Provides a set of permissions for the File Manager's folder.

IsParentFolder

Gets a value specifying whether the currently processed item is a parent folder.

Parent

Gets the immediate parent folder to which the current folder belongs.

Equals(FileManagerFolder)

Compares this FileManagerFolder instance with the specified object.

GetFiles()

Returns an array of files that are located in the current folder.

GetFolders()

Returns an array of folders, that are located in the current folder.

FileManagerFolder(FileSystemProviderBase, FileManagerFolder, String, String, FileManagerFolderProperties)

Initializes a new instance of the FileManagerFolder class with the specified settings when the specified file system provider is used.

FileManagerFolder(FileSystemProviderBase, FileManagerFolder, String, String)

Initializes a new instance of the FileManagerFolder class with the specified settings.

FileManagerFolder(FileSystemProviderBase, FileManagerFolder, String, FileManagerFolderProperties)

Initializes a new instance of the FileManagerFolder class with the specified settings when the specified file system provider is used.

FileManagerFolder(FileSystemProviderBase, FileManagerFolder, String)

Initializes a new instance of the FileManagerFolder class with the specified settings when the specified file system provider is used.

FileManagerFolder(FileSystemProviderBase, String, String[], FileManagerFolderProperties)

Initializes a new instance of the FileManagerFolder class with specified settings.

FileManagerFolder(FileSystemProviderBase, String, String[])

Initializes a new instance of the FileManagerFolder class with the specified settings.

FileManagerFolder(FileSystemProviderBase, String, String)

Initializes a new instance of the FileManagerFolder class with the specified settings.

FileManagerFolder(FileSystemProviderBase, String)

Initializes a new instance of the FileManagerFolder class with the specified relative name when the specified file system provider is used.

Remarks

Use the Folder property to identify the parent folder which owns the current file.

Examples

The code below allows end-users to upload only mp3 files to the "Music mp3" folder.

protected void ASPxFileManager1_FileUploading(object source, DevExpress.Web.FileManagerFileUploadEventArgs e) {
      if (e.File.Folder.FullName == "Files\\Music mp3")
            if (e.File.Extension != ".mp3") {
                e.Cancel = true;
                e.ErrorText = "You can only upload mp3 files to this folder";
            }
}
See Also