netatalk 4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
filedir.h File Reference
`#include <sys/stat.h>`
`#include <atalk/globals.h>`
`#include "volume.h"`

Go to the source code of this file.

## Macros
#define | TO_UTC 0
#define | TO_LOCALTIME 1

## Functions
int | set_utc_offset (uint32_t *aint_p, int offset_dir)
| Convert an AFP date-time value between local time and UTC.
char * | ctoupath (const struct vol *, struct dir *, char *)
char * | absupath (const struct vol *, struct dir *, char *)
int | veto_file (const char *veto_str, const char *path)
| given a veto_str like "abc/zxc/" and path "abc", return 1
int | check_name (const struct vol *vol, char *name)
int | delete_vetoed_files (struct vol *vol, const char *upath, bool in_vetodir)
| Recursivley delete vetoed files and directories if the volume option is set.
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_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_setfildirparams (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)

## Variables
struct afp_options | default_options

## Macro Definition Documentation

## ◆ TO_LOCALTIME

#define TO_LOCALTIME 1

## ◆ TO_UTC

#define TO_UTC 0

## Function Documentation

## ◆ absupath()

char * absupath | ( | const struct vol * | vol,
|  | struct dir * | dir,
|  | char * | u )
| extern

## ◆ afp_delete()

int afp_delete | ( | AFPObj * | obj,
|  | char * | ibuf,
|  | size_t | ibuflen,
|  | char * | rbuf,
|  | size_t * | rbuflen )

## ◆ afp_getfildirparams()

int afp_getfildirparams | ( | AFPObj * | obj,
|  | char * | ibuf,
|  | size_t | ibuflen,
|  | char * | rbuf,
|  | size_t * | rbuflen )

## ◆ afp_moveandrename()

int afp_moveandrename | ( | AFPObj * | obj,
|  | char * | ibuf,
|  | size_t | ibuflen,
|  | char * | rbuf,
|  | size_t * | rbuflen )

## ◆ afp_rename()

int afp_rename | ( | AFPObj * | obj,
|  | char * | ibuf,
|  | size_t | ibuflen,
|  | char * | rbuf,
|  | size_t * | rbuflen )

## ◆ afp_setfildirparams()

int afp_setfildirparams | ( | AFPObj * | obj,
|  | char * | ibuf,
|  | size_t | ibuflen,
|  | char * | rbuf,
|  | size_t * | rbuflen )

## ◆ check_name()

int check_name | ( | const struct vol * | vol,
|  | char * | name )
| extern

Factorise some checks on a pathname

## ◆ ctoupath()

char * ctoupath | ( | const struct vol * | vol,
|  | struct dir * | dir,
|  | char * | name )
| extern

## ◆ delete_vetoed_files()

int delete_vetoed_files | ( | struct vol * | vol,
|  | const char * | upath,
|  | bool | in_vetodir )
| extern

Recursivley delete vetoed files and directories if the volume option is set.

Parameters

  [in] | vol | volume handle
  [in] | upath | path of directory
  [in] | in_vetodir | true if we are already in a vetoed directory

If the volume option delete veto files is set, this function recursively scans the directory "upath" for vetoed files and tries deletes these, the it will try to delete the directory. That may fail if the directory contains normal files that aren't vetoed.

Returns
  0 if the directory upath and all of its contents were deleted, otherwise -1.
  If the volume option is not set it returns -1.

## ◆ set_utc_offset()

int set_utc_offset | ( | uint32_t * | aint_p,
|  | int | offset_dir )
| extern

Convert an AFP date-time value between local time and UTC.

Parameters

  aint_p | AFP date-time to be converted.
  offset_dir | Which direction we want to convert the timestamp.

## ◆ veto_file()

int veto_file | ( | const char * | veto_str,
|  | const char * | path )
| extern

given a veto_str like "abc/zxc/" and path "abc", return 1

Note
  veto_str should be '/' delimited

Returns
  if path matches any one of the veto_str elements exactly, then 1 is returned otherwise, 0 is returned.

## Variable Documentation

## ◆ default_options

struct afp_options default_options
| extern