MCPcopy Create free account
hub / github.com/davisking/dlib / file

Class file

dlib/dir_nav/dir_nav_kernel_2.h:45–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43// ----------------------------------------------------------------------------------------
44
45 class file
46 {
47 /*!
48 INITIAL VALUES
49 state.name == name()
50 state.full_name == full_name()
51 state.file_size == size()
52 state.last_modified == last_modified()
53
54 CONVENTION
55 state.name == name()
56 state.full_name == full_name()
57 state.file_size == size()
58 state.last_modified == last_modified()
59
60 !*/
61
62 friend class directory;
63
64 struct data
65 {
66 uint64 file_size;
67 std::string name;
68 std::string full_name;
69 std::chrono::time_point<std::chrono::system_clock> last_modified;
70 };
71
72 void init(const std::string& name);
73
74 public:
75
76 struct private_constructor{};
77 inline file (
78 const std::string& name,
79 const std::string& full_name,
80 const uint64 file_size,
81 const std::chrono::time_point<std::chrono::system_clock>& last_modified,
82 private_constructor
83 )
84 {
85 state.file_size = file_size;
86 state.name = name;
87 state.full_name = full_name;
88 state.last_modified = last_modified;
89 }
90
91
92 class file_not_found : public error {
93 public: file_not_found(const std::string& s): error(s){}
94 };
95
96 inline file (
97 )
98 {
99 state.file_size = 0;
100 }
101
102 file (

Callers 14

select_oldest_fileFunction · 0.70
select_newest_fileFunction · 0.70
cluster_datasetFunction · 0.50
flip_datasetFunction · 0.50
convert_pascal_v1Function · 0.50
convert_pascal_xmlFunction · 0.50
create_new_datasetFunction · 0.50
rotate_datasetFunction · 0.50
resample_datasetFunction · 0.50
tile_datasetFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected