Back to Devexpress

FileManagerItem.FullName Property

aspnet-devexpress-dot-web-dot-filemanageritem-b94fc4b4.md

latest3.7 KB
Original Source

FileManagerItem.FullName Property

Gets the full name of the current item.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public string FullName { get; }
vb
Public ReadOnly Property FullName As String

Property Value

TypeDescription
String

A String value that represents the item’s full name.

|

Remarks

The FullName property represents the full name of the current item. The full name includes an item’s location path (from the root folder) and an item’s name.

Example

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

csharp
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";
            }
}
aspx
<dx:ASPxFileManager ID="ASPxFileManager1" runat="server" OnFileUploading="ASPxFileManager1_FileUploading">
            <Settings RootFolder="~/Content/FileManager/Files" ThumbnailFolder="~\Thumb" />
</dx:ASPxFileManager>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the FullName property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

asp-net-web-forms-file-manager-azure-custom-provider/CS/DXWebApplication1/AzureFileStorageProvider.cs#L29

csharp
public override IEnumerable<FileManagerFile> GetFiles(FileManagerFolder folder) {
    String prefix = folder.FullName;

asp-net-web-forms-file-manager-azure-custom-provider/VB/DXWebApplication1/AzureFileStorageProvider.vb#L48

vb
Public Overrides Function GetFiles(ByVal folder As FileManagerFolder) As IEnumerable(Of FileManagerFile)
    Dim prefix As String = folder.FullName
    Return GetDirectory(prefix).ListFilesAndDirectories().OfType(Of CloudFile)().[Select](Function(cf) New FileManagerFile(Me, folder, cf.Name)).ToList()

See Also

Name

RelativeName

File Manager

FileManagerItem Class

FileManagerItem Members

DevExpress.Web Namespace