Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
c3909170
Commit
c3909170
authored
Jun 16, 2013
by
Davis King
Browse files
updated example
parent
bc00d55e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
examples/dir_nav_ex.cpp
examples/dir_nav_ex.cpp
+2
-4
No files found.
examples/dir_nav_ex.cpp
View file @
c3909170
...
@@ -30,16 +30,14 @@ int main(int argc, char** argv)
...
@@ -30,16 +30,14 @@ int main(int argc, char** argv)
directory
test
(
loc
);
directory
test
(
loc
);
std
::
vector
<
directory
>
dirs
;
std
::
vector
<
file
>
files
;
cout
<<
"directory: "
<<
test
.
name
()
<<
endl
;
cout
<<
"directory: "
<<
test
.
name
()
<<
endl
;
cout
<<
"full path: "
<<
test
.
full_name
()
<<
endl
;
cout
<<
"full path: "
<<
test
.
full_name
()
<<
endl
;
cout
<<
"is root: "
<<
((
test
.
is_root
())
?
"yes"
:
"no"
)
<<
endl
;
cout
<<
"is root: "
<<
((
test
.
is_root
())
?
"yes"
:
"no"
)
<<
endl
;
// get all directories and files in test
// get all directories and files in test
test
.
get_dirs
(
dirs
);
std
::
vector
<
directory
>
dirs
=
test
.
get_dirs
();
test
.
get_files
(
files
);
std
::
vector
<
file
>
files
=
test
.
get_files
();
// sort the files and directories
// sort the files and directories
sort
(
files
.
begin
(),
files
.
end
());
sort
(
files
.
begin
(),
files
.
end
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment