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; }
/// <summary> /// Creates the path information container /// </summary> /// <param name="fullpath">Full path to the file or directory (regular or unc)</param> /// <param name="win32FindData">Win32 handle information</param> internal QuickIOPathInfo(string fullpath, Win32FindData win32FindData) { Contract.Requires(fullpath != null); //Changed to allow paths which do not exist: //Contract.Requires( win32FindData != null ); this.FindData = win32FindData; this.Name = QuickIOPath.GetName(fullpath); this.FullName = QuickIOPath.ToPathRegular(fullpath); this.FullNameUnc = QuickIOPath.ToPathUnc(fullpath); // TODO: this.Parent = QuickIOPath.GetDirectoryName(fullpath); this.Root = QuickIOPath.GetPathRoot(fullpath); this.IsRoot = QuickIOPath.IsRoot(fullpath); }
/// <summary> /// Returns <see cref="Path"/> in regular. /// </summary> /// <returns></returns> public String GetPathRegular() { return(QuickIOPath.ToPathRegular(Path)); }