netatalk  4.6.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
directory.h File Reference
#include <arpa/inet.h>
#include <dirent.h>
#include <stdint.h>
#include <sys/types.h>
#include <bstrlib.h>
#include <atalk/cnid.h>
#include <atalk/hash.h>
#include <atalk/queue.h>
#include <atalk/unicode.h>

Go to the source code of this file.

Data Structures

struct  dir
struct  path

Macros

#define DIRBITS   S_ISGID
#define DIRDID_ROOT_PARENT   htonl(1)
#define DIRDID_ROOT   htonl(2)
#define DIRF_FSMASK   (3<<0)
#define DIRF_NOFS   (0<<0)
#define DIRF_UFS   (1<<1)
#define DIRF_ISFILE   (1<<3)
#define DIRF_OFFCNT   (1<<4)
#define DIRF_CNID   (1<<5)
#define DIRF_ARC_GHOST   (1<<6)
#define DIRF_INDEXED   (1<<7)
#define AD_RLEN_NO_RFORK   ((off_t) 0)
#define AD_RLEN_UNKNOWN   ((off_t) -1)
#define AD_RLEN_NO_AD   ((off_t) -2)
#define AD_RLEN_RFORK_ONLY   ((off_t) -3)

Functions

static int ad_rlen_meta_absent (off_t rlen)
static struct dirpath_cached_file (const struct path *path)
const char * dir_event_path (char *buf, size_t buflen, const struct dir *parent, const char *name)
static int path_isadir (struct path *o_path)

Variables

struct dir rootParent

Macro Definition Documentation

◆ AD_RLEN_NO_AD

#define AD_RLEN_NO_AD   ((off_t) -2)

no AD metadata, no rfork

◆ AD_RLEN_NO_RFORK

#define AD_RLEN_NO_RFORK   ((off_t) 0)

AD metadata present, no rfork

◆ AD_RLEN_RFORK_ONLY

#define AD_RLEN_RFORK_ONLY   ((off_t) -3)

no AD metadata; rfork present, size not cached

◆ AD_RLEN_UNKNOWN

#define AD_RLEN_UNKNOWN   ((off_t) -1)

not yet loaded

◆ DIRBITS

#define DIRBITS   S_ISGID

◆ DIRDID_ROOT

#define DIRDID_ROOT   htonl(2)

root directory

◆ DIRDID_ROOT_PARENT

#define DIRDID_ROOT_PARENT   htonl(1)

parent directory of root

◆ DIRF_ARC_GHOST

#define DIRF_ARC_GHOST   (1<<6)

ARC ghost entry (in B1/B2)

◆ DIRF_CNID

#define DIRF_CNID   (1<<5)

renumerate id

◆ DIRF_FSMASK

#define DIRF_FSMASK   (3<<0)

◆ DIRF_INDEXED

#define DIRF_INDEXED   (1<<7)

linked in the dircache hash index

◆ DIRF_ISFILE

#define DIRF_ISFILE   (1<<3)

it's cached file, not a directory

◆ DIRF_NOFS

#define DIRF_NOFS   (0<<0)

◆ DIRF_OFFCNT

#define DIRF_OFFCNT   (1<<4)

offsprings count is valid

◆ DIRF_UFS

#define DIRF_UFS   (1<<1)

Function Documentation

◆ ad_rlen_meta_absent()

int ad_rlen_meta_absent ( off_t rlen)
inlinestatic

AD metadata confirmed absent — ad_metadata() would fail ENOENT.

◆ dir_event_path()

const char * dir_event_path ( char * buf,
size_t buflen,
const struct dir * parent,
const char * name )
extern

Absolute path of a child of parent for FCE/Spotlight event strings, built from the cached d_fullpath — no getcwd. Falls back to fullpathname() when the parent or its path is unavailable. Returns buf, or fullpathname()'s static buffer on the fallback path.

◆ path_cached_file()

struct dir * path_cached_file ( const struct path * path)
inlinestatic

d_cached accessor enforcing the staleness rule: an entry invalidated mid-request (dir_remove sets d_did = CNID_INVALID) reads as absent.

◆ path_isadir()

int path_isadir ( struct path * o_path)
inlinestatic

Variable Documentation

◆ rootParent

struct dir rootParent
extern