#include <errno.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/param.h>#include <bstrlib.h>#include <atalk/acl.h>#include <atalk/adouble.h>#include <atalk/afp.h>#include <atalk/cnid.h>#include <atalk/errchk.h>#include <atalk/fce_api.h>#include <atalk/globals.h>#include <atalk/logger.h>#include <atalk/netatalk_conf.h>#include <atalk/server_ipc.h>#include <atalk/spotlight.h>#include <atalk/unix.h>#include <atalk/util.h>#include <atalk/vfs.h>#include "desktop.h"#include "dircache.h"#include "directory.h"#include "file.h"#include "filedir.h"#include "ad_cache.h"#include "fork.h"#include "unix.h"#include "virtual_icon.h"#include "volume.h"Functions | |
| static int | virtual_icon_reply (const AFPObj *obj, struct vol *vol, uint16_t fbitmap, uint16_t dbitmap, char *rbuf, size_t *rbuflen) |
| int | afp_getfildirparams (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen) |
| int | afp_setfildirparams (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen) |
| int | check_name (const struct vol *vol, char *name) |
| static int | moveandrename (const AFPObj *obj, struct vol *vol, struct dir *sdir, int sdir_fd, char *oldname, char *newname, int isdir) |
| move and rename sdir:oldname to curdir:newname in volume vol | |
| int | afp_rename (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen) |
| static int | delete_vetoed_files_at (struct vol *vol, int parent_fd, const char *name, bool in_vetodir) |
| Recursively delete vetoed files and directories. | |
| int | delete_vetoed_files (struct vol *vol, const char *upath, bool in_vetodir) |
| int | afp_delete (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen) |
| char * | absupath (const struct vol *vol, struct dir *dir, char *u) |
| char * | ctoupath (const struct vol *vol, struct dir *dir, char *name) |
| int | afp_moveandrename (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen) |
| int | veto_file (const char *veto_str, const char *path) |
| given a veto_str like "abc/zxc/" and path "abc", return 1 | |
| int afp_delete | ( | AFPObj * | obj, |
| char * | ibuf, | ||
| size_t | ibuflen, | ||
| char * | rbuf, | ||
| size_t * | rbuflen | ||
| ) |
| int afp_getfildirparams | ( | AFPObj * | obj, |
| char * | ibuf, | ||
| size_t | ibuflen, | ||
| char * | rbuf, | ||
| size_t * | rbuflen | ||
| ) |
| int afp_moveandrename | ( | AFPObj * | obj, |
| char * | ibuf, | ||
| size_t | ibuflen, | ||
| char * | rbuf, | ||
| size_t * | rbuflen | ||
| ) |
| int afp_rename | ( | AFPObj * | obj, |
| char * | ibuf, | ||
| size_t | ibuflen, | ||
| char * | rbuf, | ||
| size_t * | rbuflen | ||
| ) |
| int afp_setfildirparams | ( | AFPObj * | obj, |
| char * | ibuf, | ||
| size_t | ibuflen, | ||
| char * | rbuf, | ||
| size_t * | rbuflen | ||
| ) |
| int check_name | ( | const struct vol * | vol, |
| char * | name | ||
| ) |
Factorise some checks on a pathname
| int delete_vetoed_files | ( | struct vol * | vol, |
| const char * | upath, | ||
| bool | in_vetodir | ||
| ) |
|
static |
Recursively delete vetoed files and directories.
| [in] | vol | volume handle |
| [in] | parent_fd | file descriptor of the parent directory |
| [in] | name | directory name relative to parent_fd |
| [in] | in_vetodir | true if we are already in a vetoed directory |
Recursively scans the directory for vetoed files and tries to delete them, then tries to delete the directory. That may fail if the directory contains normal files that aren't vetoed.
|
static |
move and rename sdir:oldname to curdir:newname in volume vol
| int veto_file | ( | const char * | veto_str, |
| const char * | path | ||
| ) |
given a veto_str like "abc/zxc/" and path "abc", return 1