/// <summary> /// Refreshes the state of the object. /// </summary> /// <exception cref="IOException">A device such as a disk drive is not ready.</exception> public void Refresh() { List <Win32FindData> foundFiles = LongPathDirectory.EnumerateFileSystemIterator( LongPathCommon.GetDirectoryName(this.normalizedPath), Path.GetFileName(this.normalizedPath), SearchOption.TopDirectoryOnly, this.isDirectory, !this.isDirectory).ToList(); this.entryData = foundFiles.Count > 0 ? foundFiles[0] : (Win32FindData?)null; this.initialized = true; }