Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- #include <iostream>
- #include <string>
- struct FileDate {
- size_t day;
- size_t month;
- size_t year;
- FileDate(const size_t& day, const size_t& month, const size_t& year)
- : day(day), month(month), year(year){};
- };
- using directory_type = std::string;
- using date_type = FileDate;
- using name_type = std::string;
- using size_type = long double;
- using file_type = bool;
- constexpr bool FILE_TYPE = true;
- constexpr bool FOLDER_TYPE = true;
- class File {
- private:
- name_type name_;
- file_type type_;
- size_type size_;
- date_type created_;
- date_type changed_;
- directory_type directory_;
- public:
- File()
- : name_("Unnamed"),
- type_(FILE_TYPE),
- size_(0.0),
- created_(0, 0, 0),
- changed_(0, 0, 0),
- directory_("C:/Files") {}
- name_type get_name() const { return name_; }
- file_type get_type() const { return type_; }
- size_type get_size() const { return size_; }
- date_type get_created() const { return created_; }
- date_type get_changed() const { return changed_; }
- directory_type get_directory() const { return directory_; }
- void set_name(name_type& name) { name_ = name; }
- void set_type(const file_type& type) { type_ = type; }
- void set_size(const size_type& size) { size_ = size; }
- void set_created(const date_type& created) { created_ = created; }
- void set_changed(const date_type& changed) { created_ = changed; }
- void set_directory(directory_type& directory) { directory_ = directory; }
- };
- int main() {
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement