Lolly 1.4.27
Loading...
Searching...
No Matches
file.hpp
Go to the documentation of this file.
1
2/******************************************************************************
3 * MODULE : file.hpp
4 * DESCRIPTION: file handling
5 * COPYRIGHT : (C) 1999 Joris van der Hoeven
6 * 2023 Darcy Shen
7 * 2023 Pluto Ye
8 * 2023 Jingkaimori
9 *******************************************************************************
10 * This software falls under the GNU general public license version 3 or later.
11 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
12 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
13 ******************************************************************************/
14
15#ifndef LOLLY_FILE_H
16#define LOLLY_FILE_H
17
18#include "url.hpp"
19
21
22bool is_directory (url u);
23bool is_regular (url u);
25bool is_newer (url which, url than);
26bool is_of_type (url name, string filter);
27
28int file_size (url u);
29int last_modified (url u);
30
33
34void mkdir (url u);
35void make_dir (url which);
36void rmdir (url u);
37void chdir (url u);
38
40url url_temp (string suffix= "");
41
42void remove (url u);
43void move (url u1, url u2);
44void copy (url u1, url u2);
45
46bool load_string (url file_name, string& s, bool fatal);
47string string_load (url u);
48bool save_string (url file_name, const string& s, bool fatal= false);
49void string_save (const string& s, url u);
50bool append_string (url u, const string& s, bool fatal);
51void string_append_to_file (const string& s, url u);
52void append_to (url what, url to);
53#endif
The list class represents a linked list.
Definition list.hpp:48
Definition url.hpp:37
int last_modified(url u)
Definition file.cpp:169
bool is_regular(url u)
Definition file.cpp:57
void string_save(const string &s, url u)
Definition file.cpp:496
bool is_directory(url u)
Definition file.cpp:38
bool is_newer(url which, url than)
Definition file.cpp:90
url subdirectories(url u)
Definition file.cpp:211
void rmdir(url u)
Definition file.cpp:249
void move(url u1, url u2)
Definition file.cpp:310
bool append_string(url u, const string &s, bool fatal)
Definition file.cpp:543
bool save_string(url file_name, const string &s, bool fatal=false)
Definition file.cpp:490
void chdir(url u)
Definition file.cpp:263
bool is_local_and_single(url u)
Definition file.cpp:22
bool is_symbolic_link(url u)
Definition file.cpp:76
bool load_string(url file_name, string &s, bool fatal)
Definition file.cpp:434
url url_temp_dir()
Definition file.cpp:300
void make_dir(url which)
Definition file.cpp:240
void string_append_to_file(const string &s, url u)
Definition file.cpp:549
void copy(url u1, url u2)
Definition file.cpp:318
int file_size(url u)
Definition file.cpp:155
url url_temp(string suffix="")
Definition file.cpp:274
string string_load(url u)
Definition file.cpp:440
void remove(url u)
Definition file.cpp:326
void mkdir(url u)
Definition file.cpp:226
void append_to(url what, url to)
Definition file.cpp:554
bool is_of_type(url name, string filter)
Definition file.cpp:105
array< string > read_directory(url u, bool &error_flag)
Definition file.cpp:194
string suffix(url u, bool use_locase)
Definition url.cpp:381