1.1 --- a/libfsclient/lib/src/client.cc Fri Jan 14 01:10:35 2022 +0100
1.2 +++ b/libfsclient/lib/src/client.cc Thu Jan 27 23:45:17 2022 +0100
1.3 @@ -1,7 +1,7 @@
1.4 /*
1.5 * Filesystem client functions.
1.6 *
1.7 - * Copyright (C) 2018, 2019, 2020, 2021 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2018, 2019, 2020, 2021, 2022 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 * This program is free software; you can redistribute it and/or
1.11 * modify it under the terms of the GNU General Public License as
1.12 @@ -377,6 +377,24 @@
1.13
1.14
1.15
1.16 +/* Rename a file in the filesystem. */
1.17 +
1.18 +long client_rename(const char *source, const char *target)
1.19 +{
1.20 + l4_cap_idx_t server = l4re_env_get_cap("server");
1.21 +
1.22 + return client_rename_using(source, target, server);
1.23 +}
1.24 +
1.25 +/* Rename a file in the filesystem via a named capability. */
1.26 +
1.27 +long client_rename_using(const char *source, const char *target, l4_cap_idx_t server)
1.28 +{
1.29 + return file_rename(source, target, server);
1.30 +}
1.31 +
1.32 +
1.33 +
1.34 /* Obtain the current region of a pipe. */
1.35
1.36 long client_current_region(file_t *file)