$darkmode
#include <arpa/inet.h>#include <sys/param.h>#include <atalk/adouble.h>#include <atalk/globals.h>#include "directory.h"#include "volume.h"Go to the source code of this file.
Macros | |
| #define | FILPBIT_ATTR 0 |
| #define | FILPBIT_PDID 1 |
| #define | FILPBIT_CDATE 2 |
| #define | FILPBIT_MDATE 3 |
| #define | FILPBIT_BDATE 4 |
| #define | FILPBIT_FINFO 5 |
| #define | FILPBIT_LNAME 6 |
| #define | FILPBIT_SNAME 7 |
| #define | FILPBIT_FNUM 8 |
| #define | FILPBIT_DFLEN 9 |
| #define | FILPBIT_RFLEN 10 |
| #define | FILPBIT_EXTDFLEN 11 |
| #define | FILPBIT_PDINFO 13 |
| #define | FILPBIT_EXTRFLEN 14 |
| #define | FILPBIT_UNIXPR 15 |
| #define | kTextEncodingUTF8 0x08000103 |
Functions | |
| char * | set_name (const struct vol *, char *, cnid_t, char *, cnid_t, uint32_t) |
| struct extmap * | getextmap (const char *) |
| struct extmap * | getdefextmap (void) |
| int | getfilparams (const AFPObj *obj, struct vol *, uint16_t, struct path *, struct dir *, char *buf, size_t *, int skip_fork_check) |
| int | setfilparams (const AFPObj *obj, struct vol *, struct path *, uint16_t, char *) |
| int | renamefile (struct vol *, struct dir *, int, char *, char *, char *, struct adouble *) |
| Rename a file, including its resource fork and mac name. More... | |
| int | copyfile (struct vol *, struct vol *, struct dir *, int, char *, char *, char *, struct adouble *) |
| int | deletefile (const struct vol *, int, char *, int) |
| int | getmetadata (const AFPObj *obj, struct vol *vol, uint16_t bitmap, struct path *path, struct dir *dir, char *buf, size_t *buflen, struct adouble *adp) |
| void * | get_finderinfo (const struct vol *, const char *, struct adouble *, void *, int) |
| size_t | mtoUTF8 (const struct vol *, const char *, size_t, char *, size_t) |
| int | copy_path_name (const struct vol *, char *, char *i) |
| uint32_t | get_id (struct vol *, struct adouble *, const struct stat *, cnid_t, const char *, int) |
| Get CNID for did/upath args both from database and adouble file. More... | |
| int | afp_exchangefiles (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen) |
| int | afp_setfilparams (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen) |
| int | afp_copyfile (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen) |
| int | afp_createfile (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen) |
| int | afp_createid (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen) |
| int | afp_resolveid (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen) |
| int | afp_deleteid (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen) |
Variables | |
| const uint8_t | ufinderi [] |
| #define FILPBIT_ATTR 0 |
| #define FILPBIT_BDATE 4 |
| #define FILPBIT_CDATE 2 |
| #define FILPBIT_DFLEN 9 |
| #define FILPBIT_EXTDFLEN 11 |
| #define FILPBIT_EXTRFLEN 14 |
| #define FILPBIT_FINFO 5 |
| #define FILPBIT_FNUM 8 |
| #define FILPBIT_LNAME 6 |
| #define FILPBIT_MDATE 3 |
| #define FILPBIT_PDID 1 |
| #define FILPBIT_PDINFO 13 |
ProDOS Info/ UTF8 name
| #define FILPBIT_RFLEN 10 |
| #define FILPBIT_SNAME 7 |
| #define FILPBIT_UNIXPR 15 |
| #define kTextEncodingUTF8 0x08000103 |
| enum kTextEncoding_t |
Mac OS encodings
| int afp_copyfile | ( | AFPObj * | obj, |
| char * | ibuf, | ||
| size_t | ibuflen, | ||
| char * | rbuf, | ||
| size_t * | rbuflen | ||
| ) |
| int afp_createfile | ( | AFPObj * | obj, |
| char * | ibuf, | ||
| size_t | ibuflen, | ||
| char * | rbuf, | ||
| size_t * | rbuflen | ||
| ) |
| int afp_createid | ( | AFPObj * | obj, |
| char * | ibuf, | ||
| size_t | ibuflen, | ||
| char * | rbuf, | ||
| size_t * | rbuflen | ||
| ) |
| int afp_deleteid | ( | AFPObj * | obj, |
| char * | ibuf, | ||
| size_t | ibuflen, | ||
| char * | rbuf, | ||
| size_t * | rbuflen | ||
| ) |
| int afp_exchangefiles | ( | AFPObj * | obj, |
| char * | ibuf, | ||
| size_t | ibuflen, | ||
| char * | rbuf, | ||
| size_t * | rbuflen | ||
| ) |
| int afp_resolveid | ( | AFPObj * | obj, |
| char * | ibuf, | ||
| size_t | ibuflen, | ||
| char * | rbuf, | ||
| size_t * | rbuflen | ||
| ) |
resolve a file id
| int afp_setfilparams | ( | AFPObj * | obj, |
| char * | ibuf, | ||
| size_t | ibuflen, | ||
| char * | rbuf, | ||
| size_t * | rbuflen | ||
| ) |
| int copy_path_name | ( | const struct vol * | vol, |
| char * | newname, | ||
| char * | i | ||
| ) |
| int copyfile | ( | struct vol * | s_vol, |
| struct vol * | d_vol, | ||
| struct dir * | d_dir, | ||
| int | sfd, | ||
| char * | src, | ||
| char * | dst, | ||
| char * | newname, | ||
| struct adouble * | adp | ||
| ) |
| int deletefile | ( | const struct vol * | vol, |
| int | dirfd, | ||
| char * | file, | ||
| int | checkAttrib | ||
| ) |
| void * get_finderinfo | ( | const struct vol * | vol, |
| const char * | upath, | ||
| struct adouble * | adp, | ||
| void * | data, | ||
| int | islink | ||
| ) |
| uint32_t get_id | ( | struct vol * | vol, |
| struct adouble * | adp, | ||
| const struct stat * | st, | ||
| const cnid_t | did, | ||
| const char * | upath, | ||
| const int | len | ||
| ) |
Get CNID for did/upath args both from database and adouble file.
| [in,out] | vol | volume |
| [in,out] | adp | adouble struct of object upath, might be NULL |
| [in] | st | stat of upath, must NOT be NULL |
| [in] | did | parent CNID of upath |
| [in] | upath | name of object |
| [in] | len | strlen of upath |
| struct extmap * getdefextmap | ( | void | ) |
| struct extmap * getextmap | ( | const char * | path | ) |
| int getfilparams | ( | const AFPObj * | obj, |
| struct vol * | vol, | ||
| uint16_t | bitmap, | ||
| struct path * | path, | ||
| struct dir * | dir, | ||
| char * | buf, | ||
| size_t * | buflen, | ||
| int | skip_fork_check | ||
| ) |
| int getmetadata | ( | const AFPObj * | obj, |
| struct vol * | vol, | ||
| uint16_t | bitmap, | ||
| struct path * | path, | ||
| struct dir * | dir, | ||
| char * | buf, | ||
| size_t * | buflen, | ||
| struct adouble * | adp | ||
| ) |
| size_t mtoUTF8 | ( | const struct vol * | vol, |
| const char * | src, | ||
| size_t | srclen, | ||
| char * | dest, | ||
| size_t | destlen | ||
| ) |
convert a Mac long name to an utf8 name
| int renamefile | ( | struct vol * | vol, |
| struct dir * | ddir, | ||
| int | sdir_fd, | ||
| char * | src, | ||
| char * | dst, | ||
| char * | newname, | ||
| struct adouble * | adp | ||
| ) |
Rename a file, including its resource fork and mac name.
renamefile and copyfile take the old and new unix pathnames and the new mac name.
| vol | volume structure |
| ddir | dest dir structure |
| sdir_fd | source dir fd to which src path is relative (for openat et al semantics) passing -1 means this is not used, src path is a full path |
| src | the source path |
| dst | the dest filename in current dir |
| newname | the dest mac name |
| adp | adouble struct of src file, if open, or & zeroed one |
| char * set_name | ( | const struct vol * | vol, |
| char * | data, | ||
| cnid_t | pid, | ||
| char * | name, | ||
| cnid_t | id, | ||
| uint32_t | utf8 | ||
| ) |
| int setfilparams | ( | const AFPObj * | obj, |
| struct vol * | vol, | ||
| struct path * | path, | ||
| uint16_t | f_bitmap, | ||
| char * | buf | ||
| ) |
|
extern |