Data Fields
_Eina_File Struct Reference

This is the underlying data structure that represents a file in Eina. More...

Data Fields

 EINA_MAGIC
 Indicates whether Eina Magic should be used. More...
 
const char * filename
 The absolute path of the file. More...
 
Eina_Hashmap
 Tracks portions of a file that have been mapped with mmap(2). More...
 
Eina_Hashrmap
 Similar function to map, but used to look up mapped areas by pointer rather than offset/length. More...
 
void * global_map
 A pointer to the entire contents of the file that have been mapped with mmap(2). More...
 
Eina_Lock lock
 A file locking mechanism. More...
 
unsigned long long length
 The length of the file in bytes. More...
 
time_t mtime
 The last modified time. More...
 
ino_t inode
 The inode. More...
 
int refcount
 Keeps track of references to map. More...
 
int global_refcount
 Keeps track of references to global_map. More...
 
int fd
 The file descriptor. More...
 
Eina_Listdead_map
 Tracks regions that get a failure from mmap(2). More...
 
Eina_Bool shared: 1
 Indicates whether this file can be shared.
 
Eina_Bool delete_me: 1
 Indicates that this file should be deleted.
 
Eina_Bool global_faulty: 1
 Indicates whether global_map is bad.
 
virtual Eina_Bool: 1
 Indicates that this is a virtual file.
 

Detailed Description

This is the underlying data structure that represents a file in Eina.

Field Documentation

§ EINA_MAGIC

_Eina_File::EINA_MAGIC

Indicates whether Eina Magic should be used.

§ filename

const char* _Eina_File::filename

The absolute path of the file.

Note that the path given when calling eina_file_open will be run through eina_file_path_sanitize before it is stored here.

§ map

Eina_Hash* _Eina_File::map

Tracks portions of a file that have been mapped with mmap(2).

The key is a tuple offset/length and the data is a pointer to the mapped region.

Referenced by eina_file_clean_close(), eina_file_common_map_free(), eina_file_flush(), eina_file_virtual_map_free(), and eina_file_virtual_map_new().

§ rmap

Eina_Hash* _Eina_File::rmap

Similar function to map, but used to look up mapped areas by pointer rather than offset/length.

Referenced by eina_file_clean_close(), eina_file_common_map_free(), eina_file_flush(), eina_file_virtual_map_free(), and eina_file_virtual_map_new().

§ global_map

void* _Eina_File::global_map

A pointer to the entire contents of the file that have been mapped with mmap(2).

This is the common case, and EFL and is optimized for it.

Referenced by eina_file_flush(), eina_file_virtual_map_all(), eina_file_virtual_map_free(), and eina_file_virtual_map_new().

§ lock

Eina_Lock _Eina_File::lock

§ length

unsigned long long _Eina_File::length

The length of the file in bytes.

Referenced by eina_file_flush().

§ mtime

time_t _Eina_File::mtime

The last modified time.

§ inode

ino_t _Eina_File::inode

The inode.

§ refcount

int _Eina_File::refcount

Keeps track of references to map.

Referenced by eina_file_dup(), and eina_file_flush().

§ global_refcount

int _Eina_File::global_refcount

Keeps track of references to global_map.

Referenced by eina_file_flush(), eina_file_virtual_map_all(), and eina_file_virtual_map_free().

§ fd

int _Eina_File::fd

The file descriptor.

§ dead_map

Eina_List* _Eina_File::dead_map

Tracks regions that get a failure from mmap(2).

Referenced by eina_file_common_map_free(), and eina_file_flush().