\hypertarget{struct__Eina__File}{}\doxysection{\+\_\+\+Eina\+\_\+\+File Struct Reference}
\label{struct__Eina__File}\index{\_Eina\_File@{\_Eina\_File}}


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




{\ttfamily \#include $<$eina\+\_\+file\+\_\+common.\+h$>$}

\doxysubsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{struct__Eina__File_a587b9634ddf438b909f2a9681a7b3774}\label{struct__Eina__File_a587b9634ddf438b909f2a9681a7b3774}} 
{\bfseries EINA\+\_\+\+MAGIC}
\begin{DoxyCompactList}\small\item\em Indicates whether Eina Magic should be used. \end{DoxyCompactList}\item 
const char $\ast$ \mbox{\hyperlink{struct__Eina__File_ab2faf024c321a133252a5661591560de}{filename}}
\begin{DoxyCompactList}\small\item\em The absolute path of the file. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Hash__Group_ga9a89d7d3ee260d3a60572ebf651b07e0}{Eina\+\_\+\+Hash}} $\ast$ \mbox{\hyperlink{struct__Eina__File_af202d60b864203f478325b0203283692}{map}}
\begin{DoxyCompactList}\small\item\em Tracks portions of a file that have been mapped with mmap(2). \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_aa24e58153abfcb2b0a68364280ed8be6}\label{struct__Eina__File_aa24e58153abfcb2b0a68364280ed8be6}} 
\mbox{\hyperlink{group__Eina__Hash__Group_ga9a89d7d3ee260d3a60572ebf651b07e0}{Eina\+\_\+\+Hash}} $\ast$ {\bfseries rmap}
\begin{DoxyCompactList}\small\item\em Similar function to \mbox{\hyperlink{struct__Eina__File_af202d60b864203f478325b0203283692}{map}}, but used to look up mapped areas by pointer rather than offset/length. \end{DoxyCompactList}\item 
void $\ast$ \mbox{\hyperlink{struct__Eina__File_abf04bdf1861d8a17c475c01a0655b066}{global\+\_\+map}}
\begin{DoxyCompactList}\small\item\em A pointer to the entire contents of the file that have been mapped with mmap(2). \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_a27cefdfba152ba3a8e43d708eafb71dd}\label{struct__Eina__File_a27cefdfba152ba3a8e43d708eafb71dd}} 
\mbox{\hyperlink{group__Eina__Lock__Group_ga324ec512f8bd7a5f391239382f09d5c9}{Eina\+\_\+\+Lock}} {\bfseries lock}
\begin{DoxyCompactList}\small\item\em A file locking mechanism. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_af65d69e588731533125018298cd06503}\label{struct__Eina__File_af65d69e588731533125018298cd06503}} 
unsigned long long {\bfseries length}
\begin{DoxyCompactList}\small\item\em The length of the file in bytes. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_a07074435f639f601dc80e908b54ad1d8}\label{struct__Eina__File_a07074435f639f601dc80e908b54ad1d8}} 
time\+\_\+t {\bfseries mtime}
\begin{DoxyCompactList}\small\item\em The last modified time. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_a517f56f5a4263127b7db670ba98d4775}\label{struct__Eina__File_a517f56f5a4263127b7db670ba98d4775}} 
ino\+\_\+t {\bfseries inode}
\begin{DoxyCompactList}\small\item\em The inode. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_a5db9d54f81084ab96f524270e3247e26}\label{struct__Eina__File_a5db9d54f81084ab96f524270e3247e26}} 
int {\bfseries refcount}
\begin{DoxyCompactList}\small\item\em Keeps track of references to \mbox{\hyperlink{struct__Eina__File_af202d60b864203f478325b0203283692}{map}}. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_ac3a88ace50ec855e101bdb0f59b94e85}\label{struct__Eina__File_ac3a88ace50ec855e101bdb0f59b94e85}} 
int {\bfseries global\+\_\+refcount}
\begin{DoxyCompactList}\small\item\em Keeps track of references to \mbox{\hyperlink{struct__Eina__File_abf04bdf1861d8a17c475c01a0655b066}{global\+\_\+map}}. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_abab8dd1747c8602b43a44deaf28dae56}\label{struct__Eina__File_abab8dd1747c8602b43a44deaf28dae56}} 
\mbox{\hyperlink{group__Eina__File__Group_ga14b7b651c6a2ea038f008e908995e9a5}{Eina\+\_\+\+Statgen}} {\bfseries statgen}
\begin{DoxyCompactList}\small\item\em For inexact stats a stat gen count to rate limit syscalls to stat file. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_af16ee152235b1e73cecbfbc49046cfe6}\label{struct__Eina__File_af16ee152235b1e73cecbfbc49046cfe6}} 
int {\bfseries fd}
\begin{DoxyCompactList}\small\item\em The file descriptor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_a0b52b3136c3a63731f86aa72ea53c5dc}\label{struct__Eina__File_a0b52b3136c3a63731f86aa72ea53c5dc}} 
\mbox{\hyperlink{group__Eina__List__Group_ga3295e1210efea1fb0fd6acbf3cbc1f29}{Eina\+\_\+\+List}} $\ast$ {\bfseries dead\+\_\+map}
\begin{DoxyCompactList}\small\item\em Tracks regions that get a failure from mmap(2). \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_af476bdbf75f86d1f5bff7e97174beee5}\label{struct__Eina__File_af476bdbf75f86d1f5bff7e97174beee5}} 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} {\bfseries shared}\+: 1
\begin{DoxyCompactList}\small\item\em Indicates whether this file can be shared. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_a4ce46b533afbd57a2f4fe992bed7d8f4}\label{struct__Eina__File_a4ce46b533afbd57a2f4fe992bed7d8f4}} 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} {\bfseries delete\+\_\+me}\+: 1
\begin{DoxyCompactList}\small\item\em Indicates that this file should be deleted. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_a05c7a2eae472d39736014d4847ad3d03}\label{struct__Eina__File_a05c7a2eae472d39736014d4847ad3d03}} 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} {\bfseries global\+\_\+faulty}\+: 1
\begin{DoxyCompactList}\small\item\em Indicates whether \mbox{\hyperlink{struct__Eina__File_abf04bdf1861d8a17c475c01a0655b066}{global\+\_\+map}} is bad. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_a926c715b95fdd5c0a528363d740dd0e9}\label{struct__Eina__File_a926c715b95fdd5c0a528363d740dd0e9}} 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} {\bfseries global\+\_\+hugetlb}\+: 1
\begin{DoxyCompactList}\small\item\em Indicates whether \mbox{\hyperlink{struct__Eina__File_abf04bdf1861d8a17c475c01a0655b066}{global\+\_\+map}} uses Huge\+TLB. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_a25b58d041c2b0a61b4816702ca2166b9}\label{struct__Eina__File_a25b58d041c2b0a61b4816702ca2166b9}} 
virtual {\bfseries Eina\+\_\+\+Bool}\+: 1
\begin{DoxyCompactList}\small\item\em Indicates that this is a virtual file. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{struct__Eina__File_a0fa77328e2dda50cd447f617f6dcf111}\label{struct__Eina__File_a0fa77328e2dda50cd447f617f6dcf111}} 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} {\bfseries copied}\+: 1
\begin{DoxyCompactList}\small\item\em Indicates whether this file has copied data. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This is the underlying data structure that represents a file in Eina. 

\doxysubsection{Field Documentation}
\mbox{\Hypertarget{struct__Eina__File_ab2faf024c321a133252a5661591560de}\label{struct__Eina__File_ab2faf024c321a133252a5661591560de}} 
\index{\_Eina\_File@{\_Eina\_File}!filename@{filename}}
\index{filename@{filename}!\_Eina\_File@{\_Eina\_File}}
\doxysubsubsection{\texorpdfstring{filename}{filename}}
{\footnotesize\ttfamily const char$\ast$ \+\_\+\+Eina\+\_\+\+File\+::filename}



The absolute path of the file. 

Note that the path given when calling \mbox{\hyperlink{group__Eina__File__Group_ga9579ba508358c74ea57bd8906801cfe5}{eina\+\_\+file\+\_\+open}} will be run through \mbox{\hyperlink{group__Eina__File__Group_ga4c11cce335038a46c2979f1ecf5f3d33}{eina\+\_\+file\+\_\+path\+\_\+sanitize}} before it is stored here. 

Referenced by \mbox{\hyperlink{group__Eina__File__Group_ga9360f0d850bb1bf8bf40027985f4ed42}{eina\+\_\+file\+\_\+clean\+\_\+close()}}, \mbox{\hyperlink{group__Eina__File__Group_ga6b19a0682a3747cb5c313dc7d0e41a90}{eina\+\_\+file\+\_\+close()}}, \mbox{\hyperlink{group__Eina__File__Group_gad4bdb938ea01bafc6b194306f890e086}{eina\+\_\+file\+\_\+dup()}}, \mbox{\hyperlink{group__Eina__File__Group_gae5b1bd03a9dc86e3262ef606ba92bb26}{eina\+\_\+file\+\_\+filename\+\_\+get()}}, \mbox{\hyperlink{group__Eina__File__Group_ga9579ba508358c74ea57bd8906801cfe5}{eina\+\_\+file\+\_\+open()}}, \mbox{\hyperlink{group__Eina__File__Group_ga675ed9c701faa581e04fa6c9289376f4}{eina\+\_\+file\+\_\+refresh()}}, and \mbox{\hyperlink{group__Eina__File__Group_ga71823e5f7683d1589cb49c0f7bcbaf14}{eina\+\_\+file\+\_\+virtualize()}}.

\mbox{\Hypertarget{struct__Eina__File_af202d60b864203f478325b0203283692}\label{struct__Eina__File_af202d60b864203f478325b0203283692}} 
\index{\_Eina\_File@{\_Eina\_File}!map@{map}}
\index{map@{map}!\_Eina\_File@{\_Eina\_File}}
\doxysubsubsection{\texorpdfstring{map}{map}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Hash__Group_ga9a89d7d3ee260d3a60572ebf651b07e0}{Eina\+\_\+\+Hash}}$\ast$ \+\_\+\+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 \mbox{\hyperlink{group__Eina__File__Group_ga9360f0d850bb1bf8bf40027985f4ed42}{eina\+\_\+file\+\_\+clean\+\_\+close()}}, \mbox{\hyperlink{group__Eina__File__Group_ga7fc3c176abeb346004562e5ddfdf6e0f}{eina\+\_\+file\+\_\+common\+\_\+map\+\_\+free()}}, \mbox{\hyperlink{group__Eina__File__Group_ga64a3123b8e0b9698d30611bacd548b9e}{eina\+\_\+file\+\_\+flush()}}, \mbox{\hyperlink{group__Eina__File__Group_ga5c56a04cf4de6d43f73ce39b970132fa}{eina\+\_\+file\+\_\+map\+\_\+new()}}, \mbox{\hyperlink{group__Eina__File__Group_ga105fa4c85c984190da9c5f22b509fd15}{eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+free()}}, \mbox{\hyperlink{group__Eina__File__Group_gada097a9bd6adfc1f02de327eff447bee}{eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+new()}}, and \mbox{\hyperlink{group__Eina__File__Group_ga71823e5f7683d1589cb49c0f7bcbaf14}{eina\+\_\+file\+\_\+virtualize()}}.

\mbox{\Hypertarget{struct__Eina__File_abf04bdf1861d8a17c475c01a0655b066}\label{struct__Eina__File_abf04bdf1861d8a17c475c01a0655b066}} 
\index{\_Eina\_File@{\_Eina\_File}!global\_map@{global\_map}}
\index{global\_map@{global\_map}!\_Eina\_File@{\_Eina\_File}}
\doxysubsubsection{\texorpdfstring{global\_map}{global\_map}}
{\footnotesize\ttfamily void$\ast$ \+\_\+\+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 \mbox{\hyperlink{group__Eina__File__Group_gad4bdb938ea01bafc6b194306f890e086}{eina\+\_\+file\+\_\+dup()}}, \mbox{\hyperlink{group__Eina__File__Group_ga64a3123b8e0b9698d30611bacd548b9e}{eina\+\_\+file\+\_\+flush()}}, \mbox{\hyperlink{group__Eina__File__Group_gaae165c21af09fca39c2d1f89a92cb6b1}{eina\+\_\+file\+\_\+map\+\_\+all()}}, \mbox{\hyperlink{group__Eina__File__Group_gaf5588cddea780ff60c49cc71941648d1}{eina\+\_\+file\+\_\+map\+\_\+faulted()}}, \mbox{\hyperlink{group__Eina__File__Group_gaf52b237fec73dbbcd411c8f999c5b5df}{eina\+\_\+file\+\_\+map\+\_\+free()}}, \mbox{\hyperlink{group__Eina__File__Group_gaace9cb589759c6638e5bef044445091b}{eina\+\_\+file\+\_\+map\+\_\+populate()}}, \mbox{\hyperlink{group__Eina__File__Group_ga231e2453311f74c18d80ab75904f6a08}{eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+all()}}, \mbox{\hyperlink{group__Eina__File__Group_ga105fa4c85c984190da9c5f22b509fd15}{eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+free()}}, \mbox{\hyperlink{group__Eina__File__Group_gada097a9bd6adfc1f02de327eff447bee}{eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+new()}}, and \mbox{\hyperlink{group__Eina__File__Group_ga71823e5f7683d1589cb49c0f7bcbaf14}{eina\+\_\+file\+\_\+virtualize()}}.

