1 //------------------------------------------------------------------------------
\r
3 // System.IO.DirectoryInfo.cs
\r
5 // Copyright (C) 2001 Moonlight Enterprises, All Rights Reserved
\r
7 // Author: Jim Richardson, develop@wtfo-guru.com
\r
8 // Created: Monday, August 13, 2001
\r
10 //------------------------------------------------------------------------------
\r
13 using System.Diagnostics;
\r
14 using System.IO.Private;
21 public sealed class DirectoryInfo : FileSystemInfo
\r
24 public DirectoryInfo(string path)
\r
26 CheckArgument.Path(path, false);
\r
27 //LAMESPEC: Does not throw directory not found exception
28 // Does not throw security exception in constructor
32 public override bool Exists
\r
41 bRetCode = ((Attributes & FileAttributes.Directory) != 0);
43 catch(ArgumentException ex)
45 Debug.WriteLine(ex); // eliminates not used warning
52 public override string Name
\r
55 { //TODO: Implement this as per the documenation
\r
60 public DirectoryInfo Root
\r
68 public void Create()
\r
73 DirectoryInfo CreateSubdirectory(string path)
\r
75 return null; //TODO: Implement
\r
78 public override void Delete()
\r
80 Directory.Delete(FullPath);
\r
83 public void Delete(bool bRecurse)
\r
85 Directory.Delete(FullPath, bRecurse);
\r
89 /// Returns an array of DirectoryInfos for subdirectories
\r
91 public DirectoryInfo[] GetDirectories()
\r
93 return null; //TODO: Implement
\r
96 /// Returns an array of DirectoryInfos
\r
97 /// matching the filter specified by mask
\r
99 public static DirectoryInfo[] GetDirectories(string mask)
\r
101 return null; //TODO: Implement
\r
104 /// Returns an array of FileInfo for subdirectories
\r
106 public FileInfo[] GetFiles()
\r
111 /// Returns an array of FileInfo
\r
112 /// matching the filter specified by mask
\r
114 public static FileInfo[] GetFiles(string mask)
\r
116 return null; //TODO: Implement
\r
119 /// Returns an array of FileSystemInfo for subdirectories
\r
121 public FileSystemInfo[] GetFileSystemInfos()
\r
123 return null; //TODO: Implement
\r
126 /// Returns an array of FileSystemInfo
\r
127 /// matching the filter specified by mask
\r
129 public static FileSystemInfo[] GetFileSystemInfos(string mask)
\r
131 return null; //TODO: Implement
\r
134 public void MoveTo(string destDirName)
\r
136 Directory.Move(FullName, destDirName);
\r
139 public override string ToString()
\r