Computer Sci. Computer Architecture. Computer Network. Database DBMS. Learn SQL. Practice SQL. More Tutorials Game Development. GO Language. GIT Guide. Linux Guide. Spring Framework. Learn C Language. Core Java. Computer Science. What are Deadlocks? MongoDB vs. Interactive Courses, where you Learn by doing.
Available for FREE! The third parameter specifies whether the search operation should include all subdirectories or only the current directory.
GetFiles returns the names of files that meet the optional criteria. GetCreationTime gets the creation date and time of a directory.
GetLastAccessTime gets the date and time the specified file or directory was last accessed. GetLastWriteTime gets the date and time the specified file or directory was last written to. The example prints the creation time, last access time, and the last write time of the specified directory. GetFileSystemEntries returns the names of all files and subdirectories that meet the specified criteria. The program lists all entries from the specified directory.
The entries must start with the w character. To get the size of a directory, we use the DirectoryInfo's GetFiles method. It returns an array of type FileInfo. The FileInfo's Length property retrieves the size of a file. We search for all files in the specified directory and its subdirectories. We get the size of each of the retrieved files and add them. The copying is delegated to the DirectoryCopy method.
The third parameter determines whether to copy subdirectories as well. We create a DirectoryInfo object from the source path. Did you even try to research this yourself? This is a simple problem, there's tons of info on the subject all over the internet! Top Rated Most Recent. Accept Solution Reject Solution. Posted Dec am Pranit Kothari. Posted Dec am Amir Mahfoozi.
Add your solution here. OK Paste as. Treat my content as plain text, not as HTML. Existing Members Sign in to your account. This email is in use.
Do you need your password? Submit your solution! When answering a question please: Read the question carefully. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem.
0コメント