An enumerable collection of the files in the current directory. The path encapsulated in the DirectoryInfo object is invalid (for example, it is on an unmapped drive). The caller does not have the required permission.How do I use directoryinfo in Java?
Use the DirectoryInfo class for typical operations such as copying, moving, renaming, creating, and deleting directories. If you are going to reuse an object several times, consider using the instance method of DirectoryInfo instead of the corresponding static methods of the Directory class, because a security check will not always be necessary.How to get the name of a file in a directory?
If you only need the names of the files, use the static Directory class for better performance. For an example, see the Directory.EnumerateFiles (String) method. // Create a DirectoryInfo of the directory of the files to enumerate.What is the use of directoryinfo return function?
Returns the subdirectories of the current directory. Returns 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.