/// <summary> /// Initializes a new instance of the QuickIOAbstractBase class, which acts as a wrapper for a file path. /// </summary> /// <param name="pathInfo"><see cref="QuickIOPathInfo"/></param> /// <param name="findData"><see cref="Win32FindData"/></param> internal QuickIOFileSystemEntryBase( QuickIOPathInfo pathInfo, Win32FindData findData ) { this.PathInfo = pathInfo; this.FindData = findData; if( findData != null ) { this.Attributes = findData.dwFileAttributes; } _lastWriteTimeUtc = FindData.GetLastWriteTimeUtc(); _lastAccessTimeUtc = findData.GetLastAccessTimeUtc(); _creationTimeUtc = findData.GetCreationTimeUtc(); }
internal QuickIOFileSystemMetadataBase( string fullPath, Win32FindData win32FindData) { Contract.Requires( !String.IsNullOrWhiteSpace( fullPath ) ); Contract.Requires( win32FindData != null ); FindData = win32FindData; FullNameUnc = QuickIOPath.ToPathUnc( fullPath ); FullName = QuickIOPath.ToPathRegular( fullPath ); this.LastWriteTimeUtc = win32FindData.GetLastWriteTimeUtc(); this.LastAccessTimeUtc = win32FindData.GetLastAccessTimeUtc(); this.CreationTimeUtc = win32FindData.GetCreationTimeUtc(); Name = win32FindData.cFileName; Attributes = win32FindData.dwFileAttributes; }