acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
folder.h
1// Created by camilo on 2021-11-10 10:38 BRT <3ThomasBorregaardSorensen!!
2#pragma once
3
4
5#include "acme/filesystem/filesystem/enumerator.h"
7#include "acme/prototype/collection/bool_array.h"
8
9
10class CLASS_DECL_ACME folder :
11 virtual public ::file::enumerator,
12 virtual public ::object
13{
14public:
15
16
17 filesize m_iFilePosition;
18 ::string m_strCurrent;
19 ::file::enum_type m_etypeCurrent;
20 ::i32 m_iConsumeFromPathBeginningWhenExtracting;
21
22
23 folder();
24 ~folder() override;
25
26
27 void initialize(::particle * pparticle) override;
28
29
30 virtual bool is_reading() const;
31
32
33 virtual void open_for_reading(file_pointer pfile, ::i32 iBufferLevel = 2);
34
35
36 virtual bool locate_file(const ::file::path & path);
37 virtual bool locate_folder(const ::file::path & path);
38 virtual ::file_pointer get_file();
39 virtual ::file_pointer get_file(const ::file::path & pathFile);
40
41 ::file::enum_type type(const ::file::path & pathItem = nullptr);
42
43 virtual bool has_sub_folder(const ::file::path & pathFolder = nullptr);
44 virtual void extract(memory& m, const ::file::path & pathFile = nullptr);
45 virtual bool is_compressed(const ::file::path & pathItem = nullptr);
46
47 virtual bool locate(const ::function < bool(const_char_pointer )> & function);
48
49 virtual void e_extract_all(const ::file::path & pathTargetDir, ::file::path_array_base * ppatha = nullptr, string_array_base* pstraFilter = nullptr, bool_array* pbaBeginsFilterEat = nullptr, ::function<bool(const::scoped_string& scopedstr) > functionCallback = {});
50 virtual ::file::path e_extract_first_ends(const ::file::path& pathTargetDir, const ::scoped_string & scopedstr);
51
52 //bool _enumerates(::file::listing_base & listing) override;
53 bool enumerate(::file::listing_base& listing) override;
54
55
56 //bool perform_file_relative_name_listing(::file::listing_base& listing) override;
57
58
59 virtual void open_for_writing(file_pointer pfile);
60
61
62 virtual void add_file(const ::file::path & pathRelative, ::file::file* pfile);
63
64
65};
66
67
68
Definition enumerator.h:14
Definition file.h:33
Definition listing.h:33
Definition path_array.h:19
Definition _template_forward_declaration.h:297
Definition memory.h:33