\subsubsection*{Purpose}
Creates a new directory.
\subsubsection*{Prototype}
\code{esint8 mkdir(FileSystem *fs,eint8* dirname);}
\subsubsection*{Arguments}
Objects passed to \code{mkdir}:
\begin{itemize}
	\item{\code{fs}: pointer to the FileSystem object}
	\item{\code{dir}: pointer to the path + name of the new directory}
\end{itemize}
\subsubsection*{Return value}
Returns 0 if no errors are detected.\\
\newline
Returns non-zero if an error is detected:
\begin{itemize}
	\item{Returns -1 if the directory already exists.}
	\item{Returns -2 if the path is incorrect (parent directory does not exists).}
	\item{Returns -3 if no free space is available to create the directory.}
\end{itemize}
\subsubsection*{Example}
\lstset{numbers=left, stepnumber=1, numberstyle=\small, numbersep=5pt, tabsize=4}
\begin{lstlisting}
	#include "efs.h"

	void main(void)
	{
		EmbeddedFileSystem efsl;

		/* Initialize efsl */
		DBG((TXT("Will init efsl now.\n")));
		if(efs_init(&efsl,"/dev/sda")!=0){
			DBG((TXT("Could not initialize filesystem (err \%d).\n"),ret));
			exit(-1);
		}
		DBG((TXT("Filesystem correctly initialized.\n")));

		/* Create new directories */
		if(mkdir(&efsl.myFs,"dir1")==0){
			mkdir(&efsl.myFs,"dir1/subdir1");
			mkdir(&efsl.myFs,"dir1/subdir2");
			mkdir(&efsl.myFs,"dir1/subdir3");
		}
		
		/* Close filesystem */
		fs_umount(&efsl.myFs);
	}
\end{lstlisting}
