navit  0.5.3-trunk
file.h File Reference
#include <time.h>
#include "param.h"
#include <stdio.h>

Go to the source code of this file.

Data Structures

struct  file
 

Macros

#define PATH_MAX   4096
 

Functions

int file_request (struct file *f, struct attr **options)
 
char * file_http_header (struct file *f, char *header)
 
struct filefile_create (char *name, struct attr **options)
 
int file_is_dir (const char *name)
 Check if a given path corresponds to a directory. More...
 
int file_is_reg (const char *name)
 Check if a given path corresponds to a regular file. More...
 
long long file_size (struct file *file)
 
int file_mkdir (char *name, int pflag)
 
int file_mmap (struct file *file)
 
unsigned char * file_data_read (struct file *file, long long offset, int size)
 
unsigned char * file_data_read_special (struct file *file, int size, int *size_ret)
 
unsigned char * file_data_read_all (struct file *file)
 
void file_data_flush (struct file *file, long long offset, int size)
 
int file_data_write (struct file *file, long long offset, int size, const void *data)
 
int file_get_contents (char *name, unsigned char **buffer, int *size)
 
unsigned char * file_data_read_compressed (struct file *file, long long offset, int size, int size_uncomp)
 
void file_data_free (struct file *file, unsigned char *data)
 
int file_exists (char const *name)
 
void file_remap_readonly (struct file *f)
 
void file_unmap (struct file *f)
 
void * file_opendir (char *dir)
 
char * file_readdir (void *hnd)
 
void file_closedir (void *hnd)
 
struct filefile_create_caseinsensitive (char *name, struct attr **options)
 
void file_fsync (struct file *f)
 
void file_destroy (struct file *f)
 
struct file_wordexpfile_wordexp_new (const char *pattern)
 
int file_wordexp_get_count (struct file_wordexp *wexp)
 
char ** file_wordexp_get_array (struct file_wordexp *wexp)
 
void file_wordexp_destroy (struct file_wordexp *wexp)
 
int file_get_param (struct file *file, struct param_list *param, int count)
 
int file_version (struct file *file, int byname)
 
void * file_get_os_handle (struct file *file)
 
int file_set_cache_size (int cache_size)
 
void file_init (void)
 
void file_data_remove (struct file *file, unsigned char *data)
 

Macro Definition Documentation

◆ PATH_MAX

#define PATH_MAX   4096

Navit, a modular navigation system. Copyright (C) 2005-2008 Navit Team

This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Function Documentation

◆ file_closedir()

void file_closedir ( void *  hnd)

◆ file_create()

◆ file_create_caseinsensitive()

struct file* file_create_caseinsensitive ( char *  name,
struct attr **  options 
)

◆ file_data_flush()

void file_data_flush ( struct file file,
long long  offset,
int  size 
)

◆ file_data_free()

◆ file_data_read()

◆ file_data_read_all()

unsigned char* file_data_read_all ( struct file file)

◆ file_data_read_compressed()

unsigned char* file_data_read_compressed ( struct file file,
long long  offset,
int  size,
int  size_uncomp 
)

◆ file_data_read_special()

◆ file_data_remove()

void file_data_remove ( struct file file,
unsigned char *  data 
)

◆ file_data_write()

int file_data_write ( struct file file,
long long  offset,
int  size,
const void *  data 
)

◆ file_destroy()

◆ file_exists()

◆ file_fsync()

void file_fsync ( struct file f)

References file::f.

Referenced by vehicle_file_destroy().

◆ file_get_contents()

int file_get_contents ( char *  name,
unsigned char **  buffer,
int *  size 
)

◆ file_get_os_handle()

void* file_get_os_handle ( struct file file)

References file::fd.

◆ file_get_param()

int file_get_param ( struct file file,
struct param_list param,
int  count 
)

◆ file_http_header()

char* file_http_header ( struct file f,
char *  header 
)

◆ file_init()

void file_init ( void  )

References cache_new(), dbg, file_cache, and lvl_error.

Referenced by add_plugin(), and main_real().

◆ file_is_dir()

int file_is_dir ( const char *  name)

Check if a given path corresponds to a directory.

Parameters
nameThe path to the filesystem element
Returns
!=0 (true) if name is a directory

References name, and S_ISDIR.

Referenced by file_mkdir(), and xinclude().

◆ file_is_reg()

int file_is_reg ( const char *  name)

Check if a given path corresponds to a regular file.

Parameters
nameThe path to the filesystem element
Returns
!=0 (true) if name is a regular file

References name, and S_ISREG.

Referenced by vehicle_file_open().

◆ file_mkdir()

int file_mkdir ( char *  name,
int  pflag 
)

◆ file_mmap()

◆ file_opendir()

void* file_opendir ( char *  dir)

◆ file_readdir()

char* file_readdir ( void *  hnd)

◆ file_remap_readonly()

void file_remap_readonly ( struct file f)

References file::begin, file::fd, and file::size.

◆ file_request()

int file_request ( struct file f,
struct attr **  options 
)

◆ file_set_cache_size()

int file_set_cache_size ( int  cache_size)

References cache_resize(), and file_cache.

Referenced by config_set_attr_int().

◆ file_size()

long long file_size ( struct file file)

◆ file_unmap()

void file_unmap ( struct file f)

References file::begin, and file::size.

Referenced by file_destroy().

◆ file_version()

int file_version ( struct file file,
int  byname 
)

◆ file_wordexp_destroy()

◆ file_wordexp_get_array()

◆ file_wordexp_get_count()

◆ file_wordexp_new()