netatalk: nad_mkdir.c File Reference

netatalk 4.5.1
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
nad_mkdir.c File Reference
`#include <errno.h>`
`#include <libgen.h>`
`#include <limits.h>`
`#include <signal.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <sys/stat.h>`
`#include <sys/types.h>`
`#include <unistd.h>`
`#include <bstrlib.h>`
`#include <atalk/adouble.h>`
`#include <atalk/util.h>`
`#include <atalk/vfs.h>`
`#include <atalk/volume.h>`
`#include "nad.h"`

## Functions
static void | usage_mkdir (void)
static int | mkdir_with_cnid (const char *path, mode_t mode, afpvol_t *vol)
| Create a single directory with CNID and AppleDouble metadata.
static int | do_mkdir (const char *path, afpvol_t *vol)
| Create directory and optionally intermediate parents.
int | nad_mkdir (int argc, char *argv[], AFPObj *obj)

## Function Documentation

## ◆ do_mkdir()

int do_mkdir | ( | const char * | path,
|  | afpvol_t * | vol )
| static

Create directory and optionally intermediate parents.

When pflag is set, creates all missing intermediate directories along the path, registering each with the CNID database.

Parameters

  [in] | path | path of directory to create
  [in] | vol | open AFP volume

Returns
  0 on success, 1 on error

## ◆ mkdir_with_cnid()

int mkdir_with_cnid | ( | const char * | path,
|  | mode_t | mode,
|  | afpvol_t * | vol )
| static

Create a single directory with CNID and AppleDouble metadata.

Parameters

  [in] | path | absolute path of directory to create
  [in] | mode | permission mode for the new directory
  [in] | vol | open AFP volume

Returns
  0 on success, -1 on error

## ◆ nad_mkdir()

int nad_mkdir | ( | int | argc,
|  | char * | argv[],
|  | AFPObj * | obj )

## ◆ usage_mkdir()

void usage_mkdir | ( | void |  | ) |
| static