Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

File System utility functions.

License

NotificationsYou must be signed in to change notification settings

sagiegurari/c_fsio

Repository files navigation

CIReleaselicense

File System functions and utilities.

Overview

This library provides a set of utility functions to work with the file system.
This includes writing/append text files with automatic directory creation, creating full directory path and more.

Usage

#include"fsio.h"#include<stdbool.h>#include<stdio.h>intmain(){// simple examples of writing/appending/reading text fileschar*file="./somedir/myfile.txt";booldone=fsio_write_text_file(file,"some text\n");printf("Text file written: %d\n",done);done=fsio_append_text_file(file,"more text\n");printf("Text file appended: %d\n",done);char*text=fsio_read_text_file(file);printf("Read text:\n%s\n",text);// creating a full directory pathdone=fsio_mkdirs("./somedir/dir1/dir2/dir3",FSIO_MODE_ALL);printf("Created directories: %d\n",done);// chmod to all permissions recursivelydone=fsio_chmod_recursive("./somedir/",FSIO_MODE_ALL);printf("Chmod done: %d\n",done);// recursive delete or files and directoriesdone=fsio_remove("./somedir");printf("Deleted somedir and all content.\n");}

Contributing

Seecontributing guide

Release History

SeeChangelog

License

Developed by Sagie Gur-Ari and licensed under the Apache 2 open source license.


[8]ページ先頭

©2009-2025 Movatter.jp