Coder Social home page Coder Social logo

Comments (6)

alphaleonis avatar alphaleonis commented on August 27, 2024

Comment by Yomodo from Friday Jan 09, 2015 at 11:35 GMT


What type of device is G: (external drive, USB stick, ...)
NTFS formatting?

from alphafs.

alphaleonis avatar alphaleonis commented on August 27, 2024

Comment by hnorihiro from Wednesday Jan 14, 2015 at 01:03 GMT


Yes, it is NTFS(USB Drive).
Drive When it is empty after formatting, occurs error.
Drive When $RECYCLE.BIN exist,does not occurs.

from alphafs.

alphaleonis avatar alphaleonis commented on August 27, 2024

Comment by Yomodo from Wednesday Jan 14, 2015 at 23:24 GMT


Does it still throw the exception if you execute: info.Refresh(); first?

from alphafs.

alphaleonis avatar alphaleonis commented on August 27, 2024

Comment by hnorihiro from Thursday Jan 15, 2015 at 01:49 GMT


OS Windows7
.NET 3.5

DirectoryInfo info = new DirectoryInfo(@"G:\");
info.Refresh();
info.GetFileSystemInfos();//Directory not found Exception

it still throw the exception .

from alphafs.

alphaleonis avatar alphaleonis commented on August 27, 2024

Comment by Yomodo from Thursday Jan 15, 2015 at 10:14 GMT


Confirmed on Windows 8.1 X64

It seems related to the volume label.
The exception can be avoided with: /v:myLabel
But even then I still see the Exception thrown, sometimes.

var drive = @"D:";
var format_cmd = "/C format.com " + drive + " /fs:NTFS /v:myLabel /q";

using (var process = Process.Start("CMD.exe", format_cmd))
    process.WaitForExit();

DirectoryInfo info = new DirectoryInfo(drive + @"\");
info.GetFileSystemInfos();

However, System.IO indeed does not throw an Exception.

from alphafs.

Yomodo avatar Yomodo commented on August 27, 2024

Unfortunately, I could not find anything to fix within AlphaFS.

The only possbile fix for this issue,
is to add a: Thread.Sleep(1000); before calling DirectoryInfo().

from alphafs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.