Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yuhao Liu
ogs
Commits
f7c8284a
Commit
f7c8284a
authored
12 years ago
by
Dmitri Naumov
Browse files
Options
Downloads
Patches
Plain Diff
Hide findLastPathSeparator() from interface.
parent
a701cefd
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
BaseLib/FileTools.cpp
+5
-0
5 additions, 0 deletions
BaseLib/FileTools.cpp
BaseLib/FileTools.h
+0
-7
0 additions, 7 deletions
BaseLib/FileTools.h
Tests/BaseLib/TestFilePathStringManipulation.cpp
+1
-0
1 addition, 0 deletions
Tests/BaseLib/TestFilePathStringManipulation.cpp
with
6 additions
and
7 deletions
BaseLib/FileTools.cpp
+
5
−
0
View file @
f7c8284a
...
...
@@ -61,6 +61,11 @@ void truncateFile( std::string const& filename)
ofs
.
close
();
}
/** Finds the position of last file path separator.
* Checks for unix or windows file path separators in given path and returns the
* position of the last one or std::string::npos if no file path separator was
* found.
*/
size_t
findLastPathSeparator
(
std
::
string
const
&
path
)
{
return
path
.
find_last_of
(
"/
\\
"
);
...
...
This diff is collapsed.
Click to expand it.
BaseLib/FileTools.h
+
0
−
7
View file @
f7c8284a
...
...
@@ -21,13 +21,6 @@
namespace
BaseLib
{
/** Finds the position of last file path separator.
* Checks for unix or windows file path separators in given path and returns the
* position of the last one or std::string::npos if no file path separator was
* found.
*/
size_t
findLastPathSeparator
(
std
::
string
const
&
path
);
/**
* \brief Returns true if given file exists. From http://www.techbytes.ca/techbyte103.html
*
...
...
This diff is collapsed.
Click to expand it.
Tests/BaseLib/TestFilePathStringManipulation.cpp
+
1
−
0
View file @
f7c8284a
...
...
@@ -8,6 +8,7 @@
#include
"gtest.h"
#include
"FileTools.h"
#include
"FileTools.cpp"
TEST
(
BaseLib
,
FindLastPathSeparatorWin
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment