if (File.Exists(path))
throw new IOException ("Cannot create " + path + " because a file with the same name already exists.");
- // LAMESPEC: with .net 1.0 version this throw NotSupportedException and msdn says so too
- // but v1.1 throws ArgumentException.
if (Environment.IsRunningOnWindows && path == ":")
throw new ArgumentException ("Only ':' In path");
info.Parent.Create ();
MonoIOError error;
- if (!MonoIO.CreateDirectory (path, out error)) {
+ if (!MonoIO.CreateDirectory (info.FullName, out error)) {
// LAMESPEC: 1.1 and 1.2alpha allow CreateDirectory on a file path.
// So CreateDirectory ("/tmp/somefile") will succeed if 'somefile' is
// not a directory. However, 1.0 will throw an exception.
return result;
}
-#if NET_4_0
public static string[] GetFileSystemEntries (string path, string searchPattern, SearchOption searchOption)
{
// Take the simple way home:
return EnumerateKind (path, "*", SearchOption.TopDirectoryOnly, FileAttributes.Normal | FileAttributes.Directory);
}
-#endif
public static DirectorySecurity GetAccessControl (string path, AccessControlSections includeSections)
{