IDZEBRA  2.1.2
Data Structures | Macros | Functions
dirs.c File Reference
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include "index.h"

Go to the source code of this file.

Data Structures

struct  dirs_info
 

Macros

#define DIRS_MAX_PATH   1024
 

Functions

static int dirs_client_proc (char *name, const char *info, int pos, void *client)
 
struct dirs_infodirs_open (Dict dict, const char *rep, int rw)
 
struct dirs_infodirs_fopen (Dict dict, const char *path, int rw)
 
struct dirs_entrydirs_read (struct dirs_info *p)
 
struct dirs_entrydirs_last (struct dirs_info *p)
 
void dirs_mkdir (struct dirs_info *p, const char *src, time_t mtime)
 
void dirs_rmdir (struct dirs_info *p, const char *src)
 
void dirs_add (struct dirs_info *p, const char *src, zint sysno, time_t mtime)
 
void dirs_del (struct dirs_info *p, const char *src)
 
void dirs_free (struct dirs_info **pp)
 

Macro Definition Documentation

#define DIRS_MAX_PATH   1024

Definition at line 32 of file dirs.c.

Referenced by dirs_add(), dirs_del(), dirs_mkdir(), and dirs_rmdir().

Function Documentation

void dirs_add ( struct dirs_info p,
const char *  src,
zint  sysno,
time_t  mtime 
)
static int dirs_client_proc ( char *  name,
const char *  info,
int  pos,
void *  client 
)
static
void dirs_del ( struct dirs_info p,
const char *  src 
)
struct dirs_info* dirs_fopen ( Dict  dict,
const char *  path,
int  rw 
)
void dirs_free ( struct dirs_info **  pp)

Definition at line 216 of file dirs.c.

References dirs_info::entries.

Referenced by file_update_top(), and repositoryShow().

struct dirs_entry* dirs_last ( struct dirs_info p)

Definition at line 164 of file dirs.c.

References dirs_info::last_entry.

Referenced by file_update_r().

void dirs_mkdir ( struct dirs_info p,
const char *  src,
time_t  mtime 
)

Definition at line 169 of file dirs.c.

References dirs_info::dict, dict_insert(), DIRS_MAX_PATH, dirs_entry::path, dirs_info::prefix, and dirs_info::rw.

Referenced by file_update_r().

struct dirs_info* dirs_open ( Dict  dict,
const char *  rep,
int  rw 
)
struct dirs_entry* dirs_read ( struct dirs_info p)
void dirs_rmdir ( struct dirs_info p,
const char *  src 
)

Definition at line 179 of file dirs.c.

References dirs_info::dict, dict_delete(), DIRS_MAX_PATH, dirs_entry::path, dirs_info::prefix, and dirs_info::rw.

Referenced by fileDelete_r().