Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
xt_mv(3)		   Library Functions Manual		      xt_mv(3)

NAME
       xt_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)

ARGUMENTS
       src     Original	filename
       dest    New filename

DESCRIPTION
       Move  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 op-
       timized cross-filesystem	file copy routine.

RETURN VALUES
       0 on success, otherwise error code from fastcp(3)

EXAMPLES
       char    *old_name, char *new_name;

       if ( xt_mv(old_name, new_name) != 0 )
       {
	   fprintf(stderr, "Failed to move %s to %s.n",	old_name, new_name);
	   ...
       }

SEE ALSO
       xt_fast_cp(3)

								      xt_mv(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=xt_mv&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>

home | help