コード例 #1
0
        /// <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;
        }
コード例 #2
0
ファイル: LongPathFileInfo.cs プロジェクト: topcss/LongPath
 /// <summary>
 /// Updates the current class' properties.
 /// </summary>
 private void UpdateProperties()
 {
     this.DirectoryName = LongPathCommon.RemoveLongPathPrefix(LongPathCommon.GetDirectoryName(this.NormalizedPath));
 }