Functions | |
char * | ssh_basename (const char *path) |
basename - parse filename component. | |
char * | ssh_dirname (const char *path) |
Parse directory component. | |
int | ssh_mkdir (const char *pathname, mode_t mode) |
Attempts to create a directory with the given pathname. | |
const char * | ssh_version (int req_version) |
Check if libssh is the required version or get the version string. |
char* ssh_basename | ( | const char * | path | ) |
basename - parse filename component.
basename breaks a null-terminated pathname string into a filename component. ssh_basename() returns the component following the final '/'. Trailing '/' characters are not counted as part of the pathname.
path | The path to parse. |
char* ssh_dirname | ( | const char * | path | ) |
Parse directory component.
dirname breaks a null-terminated pathname string into a directory component. In the usual case, ssh_dirname() returns the string up to, but not including, the final '/'. Trailing '/' characters are not counted as part of the pathname. The caller must free the memory.
path | The path to parse. |
Referenced by ssh_write_knownhost().
int ssh_mkdir | ( | const char * | pathname, | |
mode_t | mode | |||
) |
Attempts to create a directory with the given pathname.
This is the portable version of mkdir, mode is ignored on Windows systems.
pathname | The path name to create the directory. | |
mode | The permissions to use. |
Referenced by ssh_write_knownhost().
const char* ssh_version | ( | int | req_version | ) |
Check if libssh is the required version or get the version string.
req_version | The version required. |
if (ssh_version(SSH_VERSION_INT(0,2,1)) == NULL) { fprintf(stderr, "libssh version is too old!\n"); exit(1); } if (debug) { printf("libssh %s\n", ssh_version(0)); }