diff --git a/doc/tutorial.html b/doc/tutorial.html
index 067808d..f28279d 100644
--- a/doc/tutorial.html
+++ b/doc/tutorial.html
@@ -121,29 +121,26 @@ is well. A set of tutorial programs has been copied (by setup
) to
and then built. You are encouraged to modify and experiment with them as the
tutorial progresses. Just invoke the bld
script again to rebuild.
If something didn't work right, here are troubleshooting suggestions:
+If something didn't work right, here are some troubleshooting suggestions:
bjam
program executable isn't being found.
- Check your path environmental variable if it should have been found,
- otherwise see
+ b2
program executable isn't being found, check your path environmental variable
+ or see
Boost
Getting Started.bjam.log
to try to spot an indication of the
+ b2.log
to try to spot an indication of the
problem.Let's get started. One of the simplest things we can do is report the size of +
Let's get started. Our first example program, tut1.cpp, reports the size of a file.
- tut1.cpp- #include <iostream> #include <boost/filesystem.hpp> using namespace boost::filesystem; @@ -158,7 +155,6 @@ int main(int argc, char* argv[]) std::cout << argv[1] << " " << file_size(argv[1]) << '\n'; return 0; }- |
>tut1 foo-
An exception is thrown; the exact form of the response depends on +
An exception is thrown;
+ the exact form of the response depends on
Windows system options.
>tut1 .-
An exception is thrown; the exact form of the response depends on - Windows system options.
An exception is thrown;
+ the exact form of the response depends on Windows system options.
false
,
including when any element
of the path argument can't be found.
-tut2.cpp uses several of the status query functions to cope with non-existent +
tut2.cpp uses several of the status query functions to cope with non-existent files and with different kinds of files:
- tut2.cpp- int main(int argc, char* argv[]) { path p (argv[1]); // p reads clearer than argv[1] in the following code @@ -328,7 +323,6 @@ files and with different kinds of files: return 0; }- |
>dir e:\ The device is not ready. >tut2 e:\-
An exception is thrown; the exact form of the response depends on +
An exception is thrown;
+ the exact form of the response depends on
Windows system options.
@@ -429,7 +424,7 @@ acts as the end iterator.
The value type of directory_iterator
is
directory_entry
. A
-directory_entry
object contains a path
and file_status
+directory_entry object contains path
and file_status
information. A
directory_entry
object
can be used directly, but can also be passed to path
arguments in function calls.
path
arguments in f
The other need is increased robustness in the face of the many kinds of errors that can affect file system operations. We could do that at the level of each call to a Boost.Filesystem function (see Error -reporting), but it is easier to supply an overall try/catch block.
+reporting), but for simplicity tut3.cpp +uses an overall try/catch block.
- tut3.cpp- int main(int argc, char* argv[]) { path p (argv[1]); // p reads clearer than argv[1] in the following code @@ -479,7 +473,6 @@ reporting), but it is easier to supply an overall try/catch block. return 0; }- |
Move on to tut4.cpp
to see how those changes play out!
The next sections show how how those changes play out, so read on!
For directories, tut4.cpp builds a
+std::vector
of all the entries and then sorts it before writing to
+cout
.
@@ -598,7 +595,7 @@ boost::filesystem::status: The device is not ready: "e:\"
{
cout << p << " is a directory containing:\n";
- typedef vector<path> vec; // store paths,
+ typedef std::vector<path> vec; // store paths,
vec v; // so we can sort them later
copy(directory_iterator(p), directory_iterator(), back_inserter(v));
@@ -1235,7 +1232,7 @@ It has a
Distributed under the Boost Software License, Version 1.0. See www.boost.org/LICENSE_1_0.txt Revised -23 July 2015 +24 July 2015 |