|
-
August 9th, 2011, 01:34 AM
#1
boost systemfile
Hello all,
I am trying to use the "path" and "copy_file" functions of boost filesystem in C++, and they work fine, except for cases when there are hidden files/subdirectories as below:
for example, if I have the following directory pattern (Dir1 is the parent directory, and the rest are the child files/subdirectories):
Dir1
file1
file2
.file3
subdir1
.subdir2
the following code will go through the Dir1, and it will fail in creating the "path" when it reaches ".file3" or ".subdir2"
boost::filesystem: ath dir1_path(filepath.c_str());
if( !boost::filesystem::exists(dir1_path) )
cout<<"\nFile Not Found:" <<"\n";
boost::filesystem::copy_file(filepath.c_str(), dir2_path);
It is very common to have subdirectories inside directories that start with "." (in Windows platform these are the hidden files), any suggestion as far as how to copy a file that starts with character "." ?
I would appreciate some help.
thanks in advance,
Rudy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|