You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the developement of the feature which allow to drag and drop a directory (see #15), I faced a behavior that I couldnt understand.
I wrote two snippets who check if a path is a directory or a file. Any of them worked the way I think they would work.
First one:
if (!Directory.Exists(path))
{
}
Second one:
if (!File.GetAttributes(path).HasFlag(FileAttributes.Directory))
{
}
Finally I fixed it with a hack-feel solution, I checked if the path contains a extension or not. This hack will not work with a file without an extension. I can't keep that.
Hello,
During the developement of the feature which allow to drag and drop a directory (see #15), I faced a behavior that I couldnt understand.
I wrote two snippets who check if a path is a directory or a file. Any of them worked the way I think they would work.
First one:
Second one:
Finally I fixed it with a hack-feel solution, I checked if the path contains a extension or not. This hack will not work with a file without an extension. I can't keep that.
You can see the problem here.
Any idea?
The text was updated successfully, but these errors were encountered: