BlogEngine.Core.Providers.DbFileSystemProvider.FileExists C# (CSharp) Method

FileExists() public method

boolean wether a file exists by its virtual path
public FileExists ( string VirtualPath ) : bool
VirtualPath string the virtual path
return bool
        public override bool FileExists(string VirtualPath)
        {
            var db = new FileSystem.FileStoreDb(this.connectionString);
            var file = db.FileStoreFiles.FirstOrDefault(x => x.FullPath.ToLower() == VirtualPath.VirtualPathToDbPath() && x.FileStoreDirectory.BlogID == Blog.CurrentInstance.Id) == null;
            db.Dispose();
            return file;
        }