Variation-fs is single-header file system library. Written in ansi-c. Simple to use, easy to learn and has small codebase. Also updatable thanks to MIT license (Just fork it then add or remove codes).
You need to define #define VN_FS_IMPLEMENTATION
before #include "vn_fs.h"
#define VN_FS_IMPLEMENTATION
#include "vn_fs.h"
#include <stdio.h>
#define VN_FS_IMPLEMENTATION
#define VN_READ
#define VN_WRITE
#include "vn_fs.h"
int main()
{
struct vn_fss vns; /* VARIATION TUI SECURITY */
vns.fs_security = 0; /* STOP FUNCTION WHEN ERROR RECEIVED */
vn_write("test.txt", "Hey,\nhow are you?\nAre you good?", "ww", vns);
printf("%s", vn_read("test.txt", "rw", 0, vns));
vnl_write("test.txt", "?ouy era woh", 2, vns);
printf("%s", vnl_read("test.txt", 2, 4, 6, vns));
return 0;
}
You can compile as shared-library and develope os specific projects.
make win_run
Windows shared-library (.dll)
If you want to delete this file you can use
make win_clean
make uni_run
Unix shared-library (.so)
If you want to delete this file you can use
make uni_clean