#include <crm_internal.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
#include <dirent.h>
#include <pwd.h>
#include <grp.h>
#include <crm/crm.h>
#include <crm/common/util.h>
Go to the source code of this file.
|
void | crm_build_path (const char *path_c, mode_t mode) |
| Create a directory, including any parent directories needed. More...
|
|
char * | generate_series_filename (const char *directory, const char *series, int sequence, gboolean bzip) |
|
int | get_last_sequence (const char *directory, const char *series) |
|
void | write_last_sequence (const char *directory, const char *series, int sequence, int max) |
|
int | crm_chown_last_sequence (const char *directory, const char *series, uid_t uid, gid_t gid) |
|
gboolean | crm_is_writable (const char *dir, const char *file, const char *user, const char *group, gboolean need_both) |
|
void | crm_sync_directory (const char *name) |
|
char * | crm_read_contents (const char *filename) |
|
int | crm_write_sync (int fd, const char *contents) |
|
int | crm_set_nonblocking (int fd) |
|
Definition at line 22 of file io.c.
void crm_build_path |
( |
const char * |
path_c, |
|
|
mode_t |
mode |
|
) |
| |
Create a directory, including any parent directories needed.
- Parameters
-
[in] | path_c | Pathname of the directory to create |
[in] | mode | Permissions to be used (with current umask) when creating |
- Note
- This logs errors but does not return them to the caller.
Definition at line 50 of file io.c.
int crm_chown_last_sequence |
( |
const char * |
directory, |
|
|
const char * |
series, |
|
|
uid_t |
uid, |
|
|
gid_t |
gid |
|
) |
| |
Definition at line 251 of file io.c.
gboolean crm_is_writable |
( |
const char * |
dir, |
|
|
const char * |
file, |
|
|
const char * |
user, |
|
|
const char * |
group, |
|
|
gboolean |
need_both |
|
) |
| |
Definition at line 279 of file io.c.
char* crm_read_contents |
( |
const char * |
filename | ) |
|
Definition at line 395 of file io.c.
int crm_set_nonblocking |
( |
int |
fd | ) |
|
Definition at line 471 of file io.c.
void crm_sync_directory |
( |
const char * |
name | ) |
|
Definition at line 358 of file io.c.
int crm_write_sync |
( |
int |
fd, |
|
|
const char * |
contents |
|
) |
| |
Definition at line 441 of file io.c.
char* generate_series_filename |
( |
const char * |
directory, |
|
|
const char * |
series, |
|
|
int |
sequence, |
|
|
gboolean |
bzip |
|
) |
| |
Definition at line 86 of file io.c.
int get_last_sequence |
( |
const char * |
directory, |
|
|
const char * |
series |
|
) |
| |
Definition at line 122 of file io.c.
void write_last_sequence |
( |
const char * |
directory, |
|
|
const char * |
series, |
|
|
int |
sequence, |
|
|
int |
max |
|
) |
| |
Definition at line 194 of file io.c.