![]() |
![]()
| ![]() |
![]()
NAMExt_mv() - Library function equivalent of xt_mv(1) LIBRARY#include <xtend/file.h> -lxtend SYNOPSIS#include <unistd.h> #include "file.h" int xt_mv(const char *src, const char *dest) ARGUMENTSsrc Original filename dest New filename DESCRIPTIONMove file from pathname src to pathname dest. First attempt to rename using rename(3). This will fail if src and dest are in different filesystems. Then attempt to copy the file using xt_fast_cp(3), an optimized cross-filesystem file copy routine. RETURN VALUES0 on success, otherwise error code from fastcp(3) EXAMPLESchar *old_name, char *new_name; if ( xt_mv(old_name, new_name) != 0 ) { SEE ALSOxt_fast_cp(3)
|