MCPcopy Create free account
hub / github.com/boostorg/filesystem / show_status

Function show_status

example/file_status.cpp:49–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void show_status(file_status s, boost::system::error_code ec)
50{
51 boost::system::error_condition econd;
52
53 if (ec)
54 {
55 econd = ec.default_error_condition();
56 cout << "sets ec to indicate an error:\n"
57 << " ec.value() is " << ec.value() << '\n'
58 << " ec.message() is \"" << ec.message() << "\"\n"
59 << " ec.default_error_condition().value() is " << econd.value() << '\n'
60 << " ec.default_error_condition().message() is \"" << econd.message() << "\"\n";
61 }
62 else
63 cout << "clears ec.\n";
64
65 cout << "s.type() is " << s.type()
66 << ", which is defined as \"" << file_type_c_str(s.type()) << "\"\n";
67
68 cout << "exists(s) is " << (exists(s) ? "true" : "false") << "\n";
69 cout << "status_known(s) is " << (status_known(s) ? "true" : "false") << "\n";
70 cout << "is_regular_file(s) is " << (is_regular_file(s) ? "true" : "false") << "\n";
71 cout << "is_directory(s) is " << (is_directory(s) ? "true" : "false") << "\n";
72 cout << "is_other(s) is " << (is_other(s) ? "true" : "false") << "\n";
73 cout << "is_symlink(s) is " << (is_symlink(s) ? "true" : "false") << "\n";
74}
75
76void try_exists()
77{

Callers 1

cpp_mainFunction · 0.85

Calls 9

file_type_c_strFunction · 0.85
typeMethod · 0.80
existsFunction · 0.50
status_knownFunction · 0.50
is_regular_fileFunction · 0.50
is_directoryFunction · 0.50
is_otherFunction · 0.50
is_symlinkFunction · 0.50
messageMethod · 0.45

Tested by

no test coverage detected