1 \chapter{I files: l'interfaccia I/O di unix}
2 \label{cha:file_unix_interface}
4 Per poter accedere al contenuto dei file occorre anzitutto aprirlo. Questo
5 crea un canale di comunicazione che permette di eseguire una serie di
6 operazioni. Una volta terminate le operazioni, il file dovrà essere chiuso, e
7 questo chiuderà il canale di comunicazione impedendo ogni ulteriore
12 \section{I file descriptors}
13 \label{sec:fileunix_fd}
16 \section{Le funzioni base}
17 \label{sec:fileunix_base_func}
19 L'interfaccia standard unix per l'input/output sui file è su cinque funzioni
20 \texttt{open}, \texttt{read}, \texttt{write}, \texttt{lseek}, \texttt{close}
23 \subsection{La funzione \texttt{open}}
24 \label{sec:fileunix_open}
26 \subsection{La funzione \texttt{creat}}
27 \label{sec:fileunix_creat}
29 \subsection{La funzione \texttt{close}}
30 \label{sec:fileunix_close}
32 \subsection{La funzione \texttt{lseek}}
33 \label{sec:fileunix_lseek}
35 \subsection{La funzione \texttt{read}}
36 \label{sec:fileunix_read}
38 \subsection{La funzione \texttt{write}}
39 \label{sec:fileunix_write}
41 \section{La condivisione dei files}
42 \label{sec:fileunix_sharing}
45 \subsection{Operazioni atomiche}
46 \label{sec:fileunix_atomic}
48 \section{Funzioni avanzate}
49 \label{sec:fileunix_adv_func}
51 \subsection{La funzioni \texttt{dup} e \texttt{dup2}}
52 \label{sec:fileunix_dup}
54 \subsection{La funzione \texttt{fcntl}}
55 \label{sec:fileunix_fcntl}
57 \subsection{La funzione \texttt{ioctl}}
58 \label{sec:fileunix_ioctl}