mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-12 19:20:27 +09:00
torture: Added torture_isdir().
This commit is contained in:
@@ -128,6 +128,16 @@ int torture_rmdirs(const char *path) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int torture_isdir(const char *path) {
|
||||||
|
struct stat sb;
|
||||||
|
|
||||||
|
if (lstat (path, &sb) == 0 && S_ISDIR(sb.st_mode)) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int torture_libssh_verbosity(void){
|
int torture_libssh_verbosity(void){
|
||||||
return verbosity;
|
return verbosity;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ struct argument_s {
|
|||||||
void torture_cmdline_parse(int argc, char **argv, struct argument_s *arguments);
|
void torture_cmdline_parse(int argc, char **argv, struct argument_s *arguments);
|
||||||
|
|
||||||
int torture_rmdirs(const char *path);
|
int torture_rmdirs(const char *path);
|
||||||
|
int torture_isdir(const char *path);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Returns the verbosity level asked by user
|
* Returns the verbosity level asked by user
|
||||||
|
|||||||
Reference in New Issue
Block a user