plan9fox/sys/src/ape/lib
cinap_lenrek 6118d77858 ape: reimplement rename() - fixing compiler warnings and handling more error cases
handle empty filename, dot and dotdot. handle mismatching from/to directory/file
type. cleanup destination file on error. error when attempting to copy non-empty
directories.

little test program:

#include <unistd.h>
#include <stdio.h>

int
main(int argc, char *argv[])
{
	if(argc != 3){
		fprintf(stderr, "usage: %s old new\n", argv[0]);
		return 1;
	}
	if(rename(argv[1], argv[2])){
		perror("rename");
		return 1;
	}
	return 0;
}
2019-06-24 20:09:04 +02:00
..
9 ape: initial support for arm64 2019-05-03 21:06:46 +02:00
ap ape: reimplement rename() - fixing compiler warnings and handling more error cases 2019-06-24 20:09:04 +02:00
auth ape/libauth: remove auth_wep.$O from mkfile 2018-01-02 06:05:47 +01:00
bio ape: add libauth, libbio, libmp and libsec as replacements for openssl 2016-04-11 20:23:34 +02:00
bsd ape: remove getitimer setitimer implemenations 2018-07-03 12:28:05 -04:00
bz2 add zlib, bzlib and openssl ape ports 2011-05-03 09:56:35 +00:00
draw ape: move compatibility libc.h to lib9 directory and incooperate needed functions for ape/mp (wip) 2016-04-10 03:01:37 +02:00
fmt ape: fix format clash, %z is for size_t (which is a long currently), not pointer sized 2016-09-14 00:18:45 +02:00
l Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
mp ape: initial support for arm64 2019-05-03 21:06:46 +02:00
net Import sources from 2011-03-30 iso image - lib 2011-03-30 19:35:09 +03:00
sec ape: initial support for arm64 2019-05-03 21:06:46 +02:00
utf fix utf and rune handling in preparation for 32bit runes 2012-12-31 21:09:46 +01:00
v ape: add PASS_MAX constant for getpass() to limits.h (from patch/ape-pass_max) 2013-02-28 19:21:03 +01:00
z add zlib, bzlib and openssl ape ports 2011-05-03 09:56:35 +00:00
mkfile remove ape regexp library, add utility for awk native port 2016-04-27 07:52:41 -05:00