コード例 #1
0
ファイル: volicon.c プロジェクト: matthewdooler/FDT
static int volicon_rename(const char *from, const char *to)
{
    ERROR_IF_MAGIC_FILE(from, EACCES);
    ERROR_IF_MAGIC_FILE(to, EACCES);

    return fuse_fs_rename(volicon_get()->next, from, to);
}
コード例 #2
0
ファイル: subdir.c プロジェクト: bfleischer/fuse-macosx
static int subdir_rename(const char *from, const char *to)
{
	struct subdir *d = subdir_get();
	char *newfrom;
	char *newto;
	int err = subdir_addpath(d, from, &newfrom);
	if (!err) {
		err = subdir_addpath(d, to, &newto);
		if (!err) {
			err = fuse_fs_rename(d->next, newfrom, newto);
			free(newto);
		}
		free(newfrom);
	}
	return err;
}
コード例 #3
0
ファイル: iconv.c プロジェクト: 1x23/unifi-gpl
static int iconv_rename(const char *from, const char *to)
{
	struct iconv *ic = iconv_get();
	char *newfrom;
	char *newto;
	int err = iconv_convpath(ic, from, &newfrom, 0);
	if (!err) {
		err = iconv_convpath(ic, to, &newto, 0);
		if (!err) {
			err = fuse_fs_rename(ic->next, newfrom, newto);
			free(newto);
		}
		free(newfrom);
	}
	return err;
}