Exemplo n.º 1
0
 /// <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;
         //Changed to allow paths which do not exist:
         _lastWriteTimeUtc  = FindData.GetLastWriteTimeUtc();
         _lastAccessTimeUtc = findData.GetLastAccessTimeUtc();
         _creationTimeUtc   = findData.GetCreationTimeUtc();
     }
 }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
 /// <summary>
 /// Determines the time stamp of the given <see cref="Win32FindData"/>
 /// </summary>
 /// <param name="win32FindData"><see cref="Win32FindData"/></param>
 private void RetriveDateTimeInformation(Win32FindData win32FindData)
 {
     LastWriteTimeUtc = win32FindData.GetLastWriteTimeUtc();
     LastAccessTimeUtc = win32FindData.GetLastAccessTimeUtc();
     CreationTimeUtc = win32FindData.GetCreationTimeUtc();
 }
Exemplo n.º 4
0
        /// <summary>
        /// Transfers data from find data
        /// </summary>
        internal void SetFindData(Win32FindData win32FindData)
        {
            LastWriteTimeUtc = win32FindData.GetLastWriteTimeUtc();
            LastAccessTimeUtc = win32FindData.GetLastAccessTimeUtc();
            CreationTimeUtc = win32FindData.GetCreationTimeUtc();

            Name = win32FindData.cFileName;

            Attributes = win32FindData.dwFileAttributes;
        }