Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.directoryinfo?view=net-8.0
Description: WEBDirectoryInfo di = new DirectoryInfo(@"c:\MyDir"); try { // Determine whether the directory exists. if (di.Exists) { // Indicate that the directory already exists. Console.WriteLine("That path exists already."); return; } // Try to create the directory.
DA: 82 PA: 45 MOZ Rank: 85
Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.directoryinfo.getfiles?view=net-8.0
Description: WEBReturns a file list from the current directory matching the given search pattern and using a value to determine whether to search subdirectories. GetFiles () Returns a file list from the current directory. GetFiles (String) Returns a file list from the current directory matching the given search pattern.
DA: 16 PA: 13 MOZ Rank: 38
Link: https://learn.microsoft.com/en-us/dotnet/api/system.io.directoryinfo.getdirectories?view=net-8.0
Description: WEBReturns the subdirectories of the current directory. Returns an array of directories in the current DirectoryInfo matching the given search criteria. Returns an array of directories in the current DirectoryInfo matching the specified search pattern and enumeration options.
DA: 7 PA: 14 MOZ Rank: 86
Link: https://stackoverflow.com/questions/3146586/directory-vs-directoryinfo
Description: WEBJun 30, 2010 · Directory is a static class that provides static methods for working with directories. DirectoryInfo is an instance of a class that provides information about a specific directory. So for example, if you wanted the information about C:\Temp: var dirInfo = new DirectoryInfo("C:\\Temp"); if (dirInfo.Exists) {.
DA: 33 PA: 52 MOZ Rank: 57
Link: https://dotnettutorials.net/lesson/directoryinfo-class-in-csharp/
Description: WEBC# DirectoryInfo class provides functionality to work with folders or directories. At the end of this article, you will understand what DirectoryInfo Class is in C# and when and how to use DirectoryInfo Class in C# with Examples.
DA: 92 PA: 48 MOZ Rank: 100
Link: https://code-maze.com/c-sharp-managing-directories-with-directory-and-directoryinfo/
Description: WEBOct 30, 2023 · Overview of Directory and DirectoryInfo Classes in C#. In C#, the Directory and DirectoryInfo classes have distinct purposes, capabilities, and use cases.
DA: 97 PA: 39 MOZ Rank: 85
Link: https://stackoverflow.com/questions/100721/directoryinfo-getdirectories-and-attributes
Description: WEBSep 19, 2008 · return directory.GetDirectories(searchPattern, searchOption) .Where(subDir => (subDir.Attributes & FileAttributes.System) == 0) .ToArray(); } If you're building a .net v2 application, then you can use LinqBridge to give you access to all the cool Linq to objects methods (like Where () and ToArray () above). Edit.
DA: 30 PA: 49 MOZ Rank: 5
Link: https://referencesource.microsoft.com/mscorlib/system/io/directoryinfo.cs.html
Description: WEBThe reason is // we hand back a DirectoryInfo to the destination that would allow // you to read a directory listing from that directory. Sure, you // had the ability to read the file contents in the old location, // but you technically also need read permissions to the new // location as well, and write is not a true superset of read.
DA: 100 PA: 56 MOZ Rank: 62
Link: https://stackoverflow.com/questions/3023520/using-directoryinfo-in-c-sharp
Description: WEBJun 11, 2010 · If there a more efficient way to do the following: DirectoryInfo di = new DirectoryInfo(@"c:\"); newFileName = Path.Combine(di.FullName, "MyFile.Txt"); I realise that it’s only two lines of code, but given that I already have the directory, it feels like I should be able to do something like: newFileName = di.Combine(“MyFile.txt”);
DA: 31 PA: 66 MOZ Rank: 15
Link: https://www.c-sharpcorner.com/uploadfile/99aadd/working-with-the-directoryinfo-class-in-C-Sharp/
Description: WEBSep 2, 2019 · C# DirectoryInfo class provides functionality to work with folders or directories. This article will explain the DirectoryInfo class and its usage with C# code examples. The DirectoryInfo class is declared in the System.IO namespace that must be imported before you can use this class.
DA: 91 PA: 21 MOZ Rank: 28