12#ifndef __CRUN_FILE_MANAGER_H__
13#define __CRUN_FILE_MANAGER_H__
23#define OS_HOME getenv("APPDATA")
26#define CRUN_DEFAULT_SUFFIX_DIRECTORY "\\crun\\"
30#define OS_HOME getenv("HOME")
31#define CRUN_DEFAULT_SUFFIX_DIRECTORY "/.local/share/crun/"
34#define CRUN_STACKS_JSON_FILE_URL "https://raw.githubusercontent.com/ZouariOmar/cpkg/refs/heads/main/crun/crun_stacks.json"
35#define CRUN_STACKS_JSON_FILE_DEFAULT_SUFFIX CRUN_DEFAULT_SUFFIX_DIRECTORY "crun_stacks.json"
36#define CRUN_TMP_DIRECTORY_SUFFIX CRUN_DEFAULT_SUFFIX_DIRECTORY "tmp"
char * get_file_data(const char *)
Read full file content into a null-terminated buffer.
Definition crun_file_manager.c:20
const long get_file_size(FILE *)
Compute total file size for opened stream.
Definition crun_file_manager.c:74
int copy_file_to_path(const char *, const char *)
Copy a file from source path to destination path.
Definition crun_file_manager.c:111
const char * get_file_home_path(const char *)
Build home-based absolute path using suffix.
Definition crun_file_manager.c:60
int is_file_exist(const char *)
Check if file or directory exists.
Definition crun_file_manager.c:56
int is_zip_archive(const char *)
Detect whether a file is a ZIP archive using its signature.
Definition crun_file_manager.c:84