#include <errno.h>
#include <fcntl.h>
#include <libgen.h>
#include <limits.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <bstrlib.h>
#include <sys/mman.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sysexits.h>
#include <unistd.h>
#include <atalk/cnid.h>
#include <atalk/errchk.h>
#include <atalk/globals.h>
#include <atalk/logger.h>
#include <atalk/netatalk_conf.h>
#include <atalk/unicode.h>
#include <atalk/util.h>
#include "nad.h"
Functions | |
void | _log (enum logtype lt, char *fmt,...) |
int | openvol (AFPObj *obj, const char *path, afpvol_t *vol) |
void | closevol (afpvol_t *vol) |
char * | utompath (const struct vol *vol, const char *upath) |
int | convert_dots_encoding (const afpvol_t *svol, const afpvol_t *dvol, char *path) |
cnid_t | cnid_for_paths_parent (const afpvol_t *vol, const char *path, cnid_t *did) |
Variables | |
int | log_verbose |
void _log | ( | enum logtype | lt, |
char * | fmt, | ||
... ) |
void closevol | ( | afpvol_t * | vol | ) |
Resolves CNID of a given paths parent directory
path might be: (a) relative: "dir/subdir" with cwd: "/afp_volume/topdir" (b) absolute: "/afp_volume/dir/subdir"
path MUST be pointing inside vol, this is usually the case as vol has been build from path using loadvolinfo and friends.
vol | (r) pointer to afpvol_t |
path | (r) path, see above |
did | (rw) parent CNID of returned CNID |
Convert dot encoding of basename in place
path arg can be "[/][dir/ | ...]filename". It will be converted in place possible encoding ".file" as ":2efile" which means the result will be longer then the original which means provide a big enough buffer.
svol | (r) source volume |
dvol | (r) destination volume |
path | (rw) path to convert in place |
Load volinfo and initialize struct vol
obj | (r) AFPObj of the current connection |
path | (r) path to evaluate |
vol | (rw) structure to initialize |
char * utompath | ( | const struct vol * | vol, |
const char * | upath ) |
int log_verbose |