1 /* @(#) $Id: ./src/headers/file_op.h, 2011/09/08 dcid Exp $
4 /* Copyright (C) 2009 Trend Micro Inc.
7 * This program is a free software; you can redistribute it
8 * and/or modify it under the terms of the GNU General Public
9 * License (version 2) as published by the FSF - Free Software
13 /* Part of the OSSEC HIDS
14 * Available at http://www.ossec.net/hids/
17 /* Functions to handle operation with files
24 #define OS_PIDFILE "/var/run"
26 /* Set the program name. Must be done before **anything** else */
27 void OS_SetName(char *name);
29 int File_DateofChange(char *file);
31 int IsDir(char *file);
33 int CreatePID(char *name, int pid);
35 int DeletePID(char *name);
37 int MergeFiles(char *finalpath, char **files);
39 int MergeAppendFile(char *finalpath, char *files);
41 int UnmergeFiles(char *finalpath, char *optdir);
43 /* daemonize a process */
46 /* daemonize a process without closing stdin/stdou/stderr */
49 /* not really a file operation, but returns the uname */
51 /* Return basename of path */
52 char *basename_ex(char *path) __attribute__((nonnull));
54 /* Rename file or directory */
55 int rename_ex(const char *source, const char *destination) __attribute__((nonnull));
57 /* Create temporary file */
58 int mkstemp_ex(char *tmp_path) __attribute__((nonnull));
61 /* Checks for vista. */