/// <summary> /// Calculates the size of the file from the handle /// </summary> /// <param name="win32FindData"></param> private void CalculateSize(Win32FindData win32FindData) { Bytes = win32FindData.CalculateBytes(); }
/// <summary> /// Creates the file information on the basis of the path and <see cref="Win32FindData"/> /// </summary> /// <param name="pathInfo">Full path to the file</param> /// <param name="win32FindData"><see cref="Win32FindData"/></param> internal FileDetail(PathInfo pathInfo, Win32FindData win32FindData) : base(pathInfo, win32FindData) { RetriveDateTimeInformation(win32FindData); CalculateSize(win32FindData); }
/// <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(); }
/// <summary> /// Creates the file information on the basis of the path and <see cref="Win32FindData"/> /// </summary> /// <param name="fullName">Full path to the file</param> /// <param name="win32FindData"><see cref="Win32FindData"/></param> internal FileDetail(String fullName, Win32FindData win32FindData) : this(new PathInfo(fullName), win32FindData) { RetriveDateTimeInformation(win32FindData); CalculateSize(win32FindData); }