Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
c3909170
Commit
c3909170
authored
Jun 16, 2013
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated example
parent
bc00d55e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
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)
directory
test
(
loc
);
std
::
vector
<
directory
>
dirs
;
std
::
vector
<
file
>
files
;
cout
<<
"directory: "
<<
test
.
name
()
<<
endl
;
cout
<<
"full path: "
<<
test
.
full_name
()
<<
endl
;
cout
<<
"is root: "
<<
((
test
.
is_root
())
?
"yes"
:
"no"
)
<<
endl
;
// get all directories and files in test
test
.
get_dirs
(
dirs
);
test
.
get_files
(
files
);
std
::
vector
<
directory
>
dirs
=
test
.
get_dirs
(
);
std
::
vector
<
file
>
files
=
test
.
get_files
(
);
// sort the files and directories
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