7d03cf1febdd0ea5fc47a6a4f9fea351feea03bb
[ossec-hids.git] / src / headers / file_op.h
1 /* @(#) $Id$ */
2
3 /* Copyright (C) 2009 Trend Micro Inc.
4  * All rights reserved.
5  *
6  * This program is a free software; you can redistribute it
7  * and/or modify it under the terms of the GNU General Public
8  * License (version 2) as published by the FSF - Free Software
9  * Foundation
10  */
11
12 /* Part of the OSSEC HIDS
13  * Available at http://www.ossec.net/hids/
14  */
15
16 /* Functions to handle operation with files
17  */
18
19 #ifndef __FILE_H
20
21 #define __FILE_H
22
23 #define OS_PIDFILE      "/var/run"
24
25 /* Set the program name. Must be done before **anything** else */
26 void OS_SetName(char *name);
27
28 int File_DateofChange(char *file);
29
30 int IsDir(char *file);
31
32 int CreatePID(char *name, int pid);
33
34 int DeletePID(char *name);
35
36 int MergeFiles(char *finalpath, char **files);
37
38 int MergeAppendFile(char *finalpath, char *files);
39
40 int UnmergeFiles(char *finalpath, char *optdir);
41
42 /* daemonize a process */
43 void goDaemon();
44
45 /* daemonize a process without closing stdin/stdou/stderr */
46 void goDaemonLight();
47
48 /* not really a file operation, but returns the uname */
49 char *getuname();
50
51 /* Checks for vista. */
52 #ifdef WIN32
53 int checkVista();
54 int isVista;
55 #endif
56
57 #endif