-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFile.h
84 lines (71 loc) · 2.23 KB
/
File.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// Copyright Kabuki Starship� <kabukistarship.com>.
#pragma once
#ifndef SCRIPT2_FILE_DECL
#define SCRIPT2_FILE_DECL
#include <_Config.h>
#if SEAM >= SCRIPT2_FILE
#include "Uniprinter.hpp"
namespace _ {
#undef TARGS
#define TARGS
#undef TPARAMS
#define TPARAMS
/* A file in a filesystem. */
class File {
public:
/* Constructs a File from the given URI string. */
File(const CHR* uri);
/* Gets the Uniform Resource Identifier. */
const CHR* URI();
/* Sets the Uniform Resource Identifier. */
const CHR* URISet(const CHR* uri);
/* Checks to see if the given file exists. */
BOL Exists();
/* Checks to see if the file is closed. */
BOL IsOpen();
/* Opens the file. */
ISN Open();
/* Closes the file. */
void Close();
/* Gets the last time this file was modified. */
TME LastTimeModified();
/* Checks to see if the file has been modified by comparing the last time it
was modified. */
BOL HasBeenModified();
private:
const CHR* uri_; //< Uniform Resource Identifier.
TME last_time_modified_; //< Last time the URL was modified.
};
} //< namespace _
/* Prints the given item to the File. */
_::File& operator<<(_::File& o, CHA item);
_::File& operator<<(_::File& o, const CHA* item);
#if USING_UTF16 == YES_0
_::File& operator<<(_::File& o, CHB item);
_::File& operator<<(_::File& o, const CHB* item);
#endif
#if USING_UTF32 == YES_0
_::File& operator<<(_::File& o, CHC item);
_::File& operator<<(_::File& o, const CHC* item);
#endif
_::File& operator<<(_::File& o, ISC item);
_::File& operator<<(_::File& o, IUC item);
_::File& operator<<(_::File& o, ISD item);
_::File& operator<<(_::File& o, IUD item);
#if USING_FPC == YES_0
_::File& operator<<(_::File& o, FPC item);
#endif
#if USING_FPD == YES_0
_::File& operator<<(_::File& o, FPD item);
#endif
_::File& operator<<(_::File& o, _::Hexf item);
_::File& operator<<(_::File& o, _::Binaryf item);
_::File& operator<<(_::File& o, _::Centerf item);
_::File& operator<<(_::File& o, _::Rightf item);
_::File& operator<<(_::File& o, _::Linef item);
_::File& operator<<(_::File& o, _::Headingf item);
_::File& operator<<(_::File& o, _::Indentf item);
_::File& operator<<(_::File& o, _::Charsf item);
_::File& operator<<(_::File& o, _::File item);
#endif
#endif