bulk changes
This commit is contained in:
29
core/file.h
29
core/file.h
@@ -3,9 +3,32 @@
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
int take(const char *dirname);
|
||||
/* Constants for file operations */
|
||||
#define DEFAULT_DIR_PERMISSIONS 0755
|
||||
#define MAX_PATH_LENGTH 1024
|
||||
|
||||
int touch(char *, char *, ...);
|
||||
int dir(char *, ...);
|
||||
/**
|
||||
* Create directory and change into it
|
||||
* @param dirname Directory name to create and enter
|
||||
* @return 0 on success, errno on failure
|
||||
*/
|
||||
int create_and_enter_directory(const char *dirname);
|
||||
|
||||
/**
|
||||
* Create a file with formatted content
|
||||
* @param path File path to create
|
||||
* @param format Format string for file content
|
||||
* @param ... Variable arguments for formatting
|
||||
* @return 0 on success, -1 on failure
|
||||
*/
|
||||
int create_file_with_content(char *path, char *format, ...);
|
||||
|
||||
/**
|
||||
* Create a directory with formatted path
|
||||
* @param format Format string for directory path
|
||||
* @param ... Variable arguments for formatting
|
||||
* @return 0 on success, errno on failure
|
||||
*/
|
||||
int create_directory(char *format, ...);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user