IFileInfo IFileProvider.GetFileInfo(string subpath) { if (this.m_ignoreFiles.Contains(subpath)) { return(new DbFileInfo(_container.EmptyFileReference)); } IDbFileSystemEntry blob = _container.GetFileReference(subpath); return(new DbFileInfo(blob)); }
public DbFileInfo(IDbFileSystemEntry blob) { this.m_isDirectory = (blob is DirectoryReference); IFileInfo thisFile = (IFileInfo)this; if (!thisFile.IsDirectory) { this.m_fileReference = (DbFileReference)blob; this.m_exists = this.m_fileReference.Exists; if (thisFile.Exists) { this.m_length = this.m_fileReference.Properties.Length; this.m_physicalPath = this.m_fileReference.Uri.ToString(); this.m_name = this.m_fileReference.Name; this.m_lastModified = this.m_fileReference.Properties.LastModified.HasValue ? this.m_fileReference.Properties.LastModified.Value : System.DateTimeOffset.MinValue; } // End if (thisFile.Exists) } // End if (!thisFile.IsDirectory) } // End Constructor