diff options
author | djm@openbsd.org <djm@openbsd.org> | 2020-12-04 03:41:10 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2020-12-04 03:43:01 +0100 |
commit | e4d1a0b40add800b6e9352b40c2223e44acc3a45 (patch) | |
tree | 5c6f615c562f21abebb4308824f7125c4ae9e98e /sftp-client.h | |
parent | upstream: make ssh_free(NULL) a no-op (diff) | |
download | openssh-e4d1a0b40add800b6e9352b40c2223e44acc3a45.tar.xz openssh-e4d1a0b40add800b6e9352b40c2223e44acc3a45.zip |
upstream: shuffle a few utility functions into sftp-client.c; from
Jakub Jelen
OpenBSD-Commit-ID: fdeb1aae1f6149b193f12cd2af158f948c514a2a
Diffstat (limited to 'sftp-client.h')
-rw-r--r-- | sftp-client.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/sftp-client.h b/sftp-client.h index 63a9b8b13..32a24a3c4 100644 --- a/sftp-client.h +++ b/sftp-client.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp-client.h,v 1.28 2019/01/16 23:23:45 djm Exp $ */ +/* $OpenBSD: sftp-client.h,v 1.29 2020/12/04 02:41:10 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> @@ -142,4 +142,17 @@ int upload_dir(struct sftp_conn *, const char *, const char *, int, int, int, /* Concatenate paths, taking care of slashes. Caller must free result. */ char *path_append(const char *, const char *); +/* Make absolute path if relative path and CWD is given. Does not modify + * original if the the path is already absolute. */ +char *make_absolute(char *, const char *); + +/* Check if remote path is directory */ +int remote_is_dir(struct sftp_conn *conn, const char *path); + +/* Check if local path is directory */ +int local_is_dir(const char *path); + +/* Check whether path returned from glob(..., GLOB_MARK, ...) is a directory */ +int globpath_is_dir(const char *pathname); + #endif |