Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cellframe-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
20
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
cellframe
cellframe-sdk
Commits
0efcd248
Commit
0efcd248
authored
3 years ago
by
ruslan.laishev
💬
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' of
https://gitlab.demlabs.net/cellframe/cellframe-sdk
into develop
parents
44b2821c
71a3e7c7
No related branches found
No related tags found
1 merge request
!512
bugfix-5760
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dap-sdk/core/include/dap_file_utils.h
+10
-0
10 additions, 0 deletions
dap-sdk/core/include/dap_file_utils.h
dap-sdk/core/src/dap_file_utils.c
+24
-0
24 additions, 0 deletions
dap-sdk/core/src/dap_file_utils.c
with
34 additions
and
0 deletions
dap-sdk/core/include/dap_file_utils.h
+
10
−
0
View file @
0efcd248
...
...
@@ -72,6 +72,16 @@ extern "C" {
bool
dap_valid_ascii_symbols
(
const
char
*
a_dir_path
);
/**
* @brief dap_file_simple_test
* test if file presented without specific file system attributic
*
* @param a_file_path
* @return true
* @return false
*/
bool
dap_file_simple_test
(
const
char
*
a_file_path
);
/**
* Check the file for exists
*
...
...
This diff is collapsed.
Click to expand it.
dap-sdk/core/src/dap_file_utils.c
+
24
−
0
View file @
0efcd248
...
...
@@ -66,6 +66,30 @@ bool dap_valid_ascii_symbols(const char *a_string)
return
true
;
}
/**
* Check the file for exists
*
* @a_file_path filename pathname
* @return true, if file exists
*/
bool
dap_file_simple_test
(
const
char
*
a_file_path
)
{
if
(
!
a_file_path
)
return
false
;
#ifdef _WIN32
int
attr
=
GetFileAttributesA
(
a_file_path
);
if
(
attr
!=
-
1
)
return
true
;
#else
struct
stat
st
;
if
(
!
stat
(
a_file_path
,
&
st
))
{
if
(
S_ISREG
(
st
.
st_mode
))
return
true
;
}
#endif
return
false
;
}
/**
* Check the file for exists
*
...
...
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