summaryrefslogtreecommitdiffstats
path: root/core/io/file_access_pack.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit godotengine/godot@fd4c29a189e53a1e085df5b9b9a05cac9351b3efSpartan3222024-11-191-4/+0
|\
| * Merge pull request #98483 from timothyqiu/pack-dir-existsThaddeus Crews2024-11-181-4/+0
| |\ | | | | | | | | | `DirAccessPack`: Fix `file_exists` and `dir_exists` in exported projects
| | * DirAccessPack: Fix file_exists and dir_exists in exported projectsHaoyu Qiu2024-10-241-4/+0
| | |
* | | Merge commit godotengine/godot@cb411fa960f0b7fdbd97dcdb4c90f9346360ee0eSpartan3222024-11-121-11/+57
|\| |
| * | Add ability for PCK patches to remove filesJuan2024-11-111-11/+57
| | | | | | | | | | | | Co-authored-by: Mikael Hermansson <mikael@hermansson.io>
* | | Merge commit godotengine/godot@c6c464cf9ae56e8b68620af65125dd980d0e8122Spartan3222024-11-021-5/+5
|\| |
| * | [Core] Improve error messages with `vformat`A Thousand Ships2024-10-301-5/+5
| |/
* | Fix copyright headers referring to GodotSpartan3222024-10-271-2/+2
| |
* | Rebrand preambles to RedotDubhghlas McLaughlin2024-10-111-0/+2
|/ | | | | | | | | | | | | | | | | | | | | | Credits: Co-authored-by: Skogi <skogi.b@gmail.com> Co-authored-by: Spartan322 <Megacake1234@gmail.com> Co-authored-by: swashberry <swashdev@pm.me> Co-authored-by: Christoffer Sundbom <christoffer_karlsson@live.se> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: McDubh <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: Dubhghlas McLaughlin <103212704+mcdubhghlas@users.noreply.github.com> Co-authored-by: radenthefolf <radenthefolf@gmail.com> Co-authored-by: John Knight <80524176+Tekisasu-JohnK@users.noreply.github.com> Co-authored-by: Adam Vondersaar <adam.vondersaar@uphold.com> Co-authored-by: decryptedchaos <nixgod@gmail.com> Co-authored-by: zaftnotameni <122100803+zaftnotameni@users.noreply.github.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: wesam <108880473+wesamdev@users.noreply.github.com> Co-authored-by: Mister Puma <MisterPuma80@gmail.com> Co-authored-by: Aaron Benjamin <lifeartstudios@gmail.com> Co-authored-by: SingleError <isaaconeoneone@gmail.com> Co-authored-by: Bioblaze Payne <BioblazePayne@gmail.com>
* Add ability to export patch packsMikael Hermansson2024-09-251-0/+16
| | | | Co-authored-by: Poq Xert <poqxert@poqxert.ru>
* Reduce code duplication in FileAccessBlueCube33102024-09-011-15/+0
|
* Fix use-after-free in `FileAccess::exists`Mikael Hermansson2024-08-091-0/+4
|
* [Export] Use relative file base offset for embedded PCK.bruvzg2024-03-061-0/+7
|
* Add const lvalue ref to core/* container parametersMuller-Castro2024-02-141-1/+1
|
* Merge pull request #84445 from Rubonnek/add-const-references-clang-tidyRémi Verschelde2024-01-041-1/+1
|\ | | | | | | Add const references detected by clang-tidy
| * Add const references detected by clang-tidyWilson E. Alvarez2023-12-161-1/+1
| |
* | Fix FileAccessPack::get_buffer will update pos past the length of filejsjtxietian2023-12-101-1/+1
|/
* PCK file path improvementsjpcerrone2023-05-221-3/+4
| | | | | | | | Fixes godotengine#77317 (Inconsistent PCK file path behaviour). Simplifies all PCK file paths so that paths with extra '/' symbols in them still match to the same path. Fixes various FileAccess methods that didn't work when using PCK paths that contain extra '/' symbols.
* Fix misuses of error macrosDanil Alexeev2023-04-181-1/+1
|
* Restore FileAccess.close method.bruvzg2023-02-161-0/+4
|
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Replace File/Directory with FileAccess/DirAccesskobewi2022-09-191-1/+1
|
* Rename String `plus_file` to `path_join`Aaron Franke2022-08-291-1/+1
|
* Use range iterators for RBSet in most casesAaron Record2022-05-191-2/+2
|
* Replace most uses of Map by HashMapreduz2022-05-161-1/+1
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* Improve embedded PCK loading and exporting.bruvzg2022-04-201-15/+53
| | | | | | | | | | Windows export process: Limit size of executable with embedded PCK to 4 GB. Use "rcedit" before embedding PCK. Capture and process "rcedit" errors. Windows, Linux: Add support for PCK loading from executable "pck" section.
* Remove or make private `FileAccess` `close()` methods.bruvzg2022-04-121-4/+0
|
* Narrow FileAccess scope to prevent deadlocks.bruvzg2022-04-121-2/+12
|
* Make FileAccess and DirAccess classes reference counted.bruvzg2022-04-111-53/+16
|
* String: Add contains().Anilforextra2022-02-041-1/+1
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Replace String comparisons with "", String() to is_empty()Nathan Franke2021-12-091-1/+1
| | | | | | Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
* Use range iterators for `Map`Lightning_A2021-09-301-4/+4
|
* Merge pull request #48889 from Calinou/file-rename-endian-swapRémi Verschelde2021-06-031-3/+3
|\ | | | | Rename File's `endian_swap` to `big_endian`
| * Rename File's `endian_swap` to `big_endian`Hugo Locurcio2021-05-201-3/+3
| | | | | | | | This new name is more consistent with ResourceSaver and StreamPeer.
* | Rename File::get_len() get_length()Marcel Admiraal2021-05-251-1/+1
|/
* Make all file access 64-bit (uint64_t)Pedro J. Estébanez2021-05-171-19/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the types of a big number of variables. General rules: - Using `uint64_t` in general. We also considered `int64_t` but eventually settled on keeping it unsigned, which is also closer to what one would expect with `size_t`/`off_t`. - We only keep `int64_t` for `seek_end` (takes a negative offset from the end) and for the `Variant` bindings, since `Variant::INT` is `int64_t`. This means we only need to guard against passing negative values in `core_bind.cpp`. - Using `uint32_t` integers for concepts not needing such a huge range, like pages, blocks, etc. In addition: - Improve usage of integer types in some related places; namely, `DirAccess`, core binds. Note: - On Windows, `_ftelli64` reports invalid values when using 32-bit MinGW with version < 8.0. This was an upstream bug fixed in 8.0. It breaks support for big files on 32-bit Windows builds made with that toolchain. We might add a workaround. Fixes #44363. Fixes godotengine/godot-proposals#400. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* Allow nullptr with zero length in FileAccess get_bufferAlex Hirsch2021-03-161-1/+1
| | | | fix #47071
* Add parameter checkes to FileAccess get_buffer functionsAlex Hirsch2021-03-091-0/+3
| | | | fix #46540
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
* Rename empty() to is_empty()Marcel Admiraal2020-12-281-1/+1
|
* Merge pull request #40748 from RandomShaper/improve_packed_fs_apiRémi Verschelde2020-11-101-6/+24
|\ | | | | Improve/fix packed data API
| * Improve/fix packed data APIPedro J. Estébanez2020-07-271-6/+24
| | | | | | | | | | | | | | - Enhance directory API - Fix `FileAccess::exists()` not checking for PackedData being disabled - Fix moving to the parent directory (`..`) - Allow absolute paths in existence checks
* | Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
| | | | | | | | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* | Adds PCK encryption support (using script encryption key for export).bruvzg2020-09-051-4/+61
| | | | | | | | Change default encryption mode from ECB to CFB.
* | [Complex Test Layouts] Change `String` to use UTF-32 encoding on all platforms.bruvzg2020-09-031-1/+1
| |
* | added load resource pack with offset featureYilin Ma2020-09-021-4/+13
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | updated variables to use size_t removed line break to make code style more consistent added conditional check to return an error if offset field is used when loading a ZIP package fixed typo formatted file added commit regarding self contained exe files handled error loging for load zip file with offset spelling tweak updated conditional statement for magic check udpated error message when load Zip file with offset is called fix CI Trying to fix CI fix CI done Added error message for loading self-contained exe with offset. Updated documentation. Fix indent final fix indent Updated documentation. fix indents Updated doc based on suggestion Final fix fixed format
* Style: Remove unnecessary semicolons from `core`Rémi Verschelde2020-05-191-7/+7
| | | | | | | | | | Semicolons are not necessary after function definitions or control flow blocks, and having some code use them makes things inconsistent (and occasionally can mess up `clang-format`'s formatting). Removing them is tedious work though, I had to do this manually (regex + manual review) as I couldn't find a tool for that. All other code folders would need to get the same treatment.
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-11/+21
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+8
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.