njin
Engine 2D gọn nhẹ để tự tay làm game theo ý mình. Vibe coding cũng ổn luôn
Toggle main menu visibility
Loading...
Searching...
No Matches
njin_file.h
1
#pragma once
2
#include "_types.h"
3
#include <string>
4
#include <string_view>
5
6
namespace
njin {
7
struct
context;
8
11
15
bool
file_exists
(
const
char
*path);
16
21
bool
file_read
(
const
char
*path, std::string &out);
22
30
bool
file_write
(
const
char
*path, std::string_view data);
31
41
std::string
save_path
(
const
context &ctx,
const
char
*file_name);
43
}
// namespace njin
njin::file_exists
bool file_exists(const char *path)
File có tồn tại không.
njin::file_read
bool file_read(const char *path, std::string &out)
Đọc toàn bộ một file.
njin::save_path
std::string save_path(const context &ctx, const char *file_name)
Đường dẫn đầy đủ của một file lưu game, trong thư mục riêng của người dùng.
njin::file_write
bool file_write(const char *path, std::string_view data)
Ghi toàn bộ một file, tạo thư mục cha nếu chưa có.
njin_file.h
Được biên soạn bởi
1.18.0