Motr  M0
fs.c File Reference
#include "lib/trace.h"
#include <unistd.h>
#include <dirent.h>
#include <fcntl.h>
#include <errno.h>
#include "lib/memory.h"
Include dependency graph for fs.c:

Go to the source code of this file.

Macros

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_LIB
 

Functions

M0_INTERNAL int m0_cleandir (const char *dir)
 
M0_INTERNAL int m0_file_read (const char *path, char **out)
 

Macro Definition Documentation

◆ M0_TRACE_SUBSYSTEM

#define M0_TRACE_SUBSYSTEM   M0_TRACE_SUBSYS_LIB

Definition at line 23 of file fs.c.

Function Documentation

◆ m0_cleandir()

M0_INTERNAL int m0_cleandir ( const char *  dir)

Definition at line 32 of file fs.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_file_read()

M0_INTERNAL int m0_file_read ( const char *  path,
char **  out 
)

Reads file contents into dynamically allocated string.

Note
If the call succeeds, the user is responsible for freeing allocated memory with m0_free(*out).

Definition at line 61 of file fs.c.

Here is the call graph for this function:
Here is the caller graph for this function: