Tab

FileSystemProviderBase.GetLastWriteTime(FileManagerFile) Method

Override this method to implement getting the time of the last file modification.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.1.dll

Declaration

public virtual DateTime GetLastWriteTime(
    FileManagerFile file
)

Parameters

Name Type Description
file FileManagerFile

A FileManagerFile object that is the processed file.

Returns

Type Description
DateTime

A DateTime value that is the last write time.

Remarks

If you create a custom file system provider inherited from the FileSystemProviderBase class, you can override the GetLastWriteTime method to get the time of the last file modification.

Example

using DevExpress.Web.ASPxFileManager;
using System.IO;
public class LinqFileSystemProvider : FileSystemProviderBase {
    const int DbRootItemId = 1;
    DbFileSystemDataContext dataContext;
    Dictionary<int, DbFileSystemItem> folderCache;
    string rootFolderDisplayName;

    public LinqFileSystemProvider(string rootFolder)
        : base(rootFolder) {
        this.dataContext = new DbFileSystemDataContext();
        RefreshFolderCache();
    }

    public DbFileSystemDataContext DataContext { get { return dataContext; } }

    // Used to decrease the number of recursive LINQ to SQL queries made to a database
    public Dictionary<int, DbFileSystemItem> FolderCache { get { return folderCache; } }


    public override string RootFolderDisplayName { get { return rootFolderDisplayName; } }

    public override IEnumerable<Fi