Using boost::filesystem
Examples of using boost::filesystem for various things as and when I encounter them... Many have been lifted from the StackOverflow site. For reasons of brevity and clarity I generally avoid extraneous code such as exception handling etc in these examples and just focus on the techniques themselves. Shortcuts to examples covered in this boost file system tutorial are as follows: 1. Copying a directory 2. Iterating over files in a directory 3. Recursively search for a file within a directory and its subdirectories 4. Counting the number of files in a directory 5. Find out when a file was last modified 6. Rename a file 7. To remove a file or directory 8. To create a directory 9. Obtaining relative paths 10. Recursively find/delete all files in a directory 1. Copying a directory This recursively uses boost::filesystem::create_directory to create a copy of a directory including its contents, sub-directories etc. For example the MyStuff folder: Use the followi...