Boost logo

Boost Users :

From: Scott Meyers (Usenet_at_[hidden])
Date: 2003-12-11 12:57:00


On Thu, 11 Dec 2003 08:32:06 +0100, Galante Michele wrote:
> int processFile(const fs::path& fileName)
> {
> fs::path copyFileName(fileName.string() + ".bak");
> fs::copy_file(fileName, copyFileName);
> }

I had tried this before. It also throws.

> or as:
>
> int processFile(const fs::path& fileName)
> {
> fs::path copyFileName(fileName.native_file_string() + ".bak",
> fs::native);
> fs::copy_file(fileName, copyFileName);
> }

This works. Thanks very much!

Scott


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net