summaryrefslogtreecommitdiffstats
path: root/core/os/dir_access.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde2021-06-111-418/+0
| | | | | File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
* Add symlink API to the DirAccess (on macOS and Linux).bruvzg2021-05-221-5/+7
|
* Add descriptive error message when trying to access a dir failsCarlos Cabello2021-02-251-1/+1
|
* 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 🎆
* 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
* Style: Remove unnecessary semicolons from `core`Rémi Verschelde2020-05-191-4/+4
| | | | | | | | | | 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-12/+17
| | | | | 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/+1
| | | | | | | | | | | | | | | | | | | | | | | 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.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-38/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Port member initialization from constructor to declaration (C++11)Rémi Verschelde2020-05-141-8/+0
| | | | | | | | | | Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
* Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde2020-05-101-7/+14
| | | | Part of #33027.
* Replace NULL with nullptrlupoDharkael2020-04-021-5/+5
|
* Improve UX of drive lettersPedro J. Estébanez2020-03-031-0/+5
| | | | | | | | | | Namely, move the drive dropdown to just the left of the path text box and don't include the former in the latter. This improves the UX on Windows. In the UNIX case, since its concept of drives is (ab)used to provide shortcuts to useful paths, its dropdown is kept at the original location.
* Remove duplicate ERR_PRINT macro.Marcel Admiraal2020-02-051-2/+2
|
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* Added some obvious errors explanationsqarmin2019-09-251-12/+9
|
* DirAccess: Drop compat get_next(bool *is_dir) which was hiddenRémi Verschelde2019-07-251-8/+0
| | | | | | | | | Fixes this warning: ``` ./core/os/dir_access.h:74:17: warning: 'virtual String DirAccess::get_next(bool*)' was hidden [-Woverloaded-virtual] ``` Part of #30790.
* Merge pull request #30126 from qarmin/remove_unnecessary_codeRémi Verschelde2019-07-011-4/+0
|\ | | | | Remove unnecessary code and add some error explanations
| * Remove unnecessary code and add some error explanationsqarmin2019-07-011-4/+0
| |
* | Merge pull request #29815 from NilsIrl/plus_file_1Rémi Verschelde2019-07-011-1/+1
|\ \ | |/ |/| Replace ` + "/" + ` with `String::file_add()`
| * Replace ` + "/" + ` with `String::file_add()`Nils ANDRÉ-CHANG2019-06-231-1/+1
| |
* | Some code changed with Clang-Tidyqarmin2019-06-261-1/+1
|/
* Add FileAccess::set_unix_permissions for Unix platformsJuan Linietsky2019-04-071-1/+1
|
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Moved member variables to initializer listWilson E. Alvarez2018-12-111-3/+3
|
* 22478: Can't duplicate folder with another folder insideDualtagh Murray2018-10-021-1/+5
|
* Fix warnings about unhandled enum value in switch [-Wswitch]Rémi Verschelde2018-09-271-0/+1
| | | | | | | | | | | Fixes GCC 5 warnings of the form: core/io/http_client.cpp:288:9: warning: enumeration value 'STATUS_SSL_HANDSHAKE_ERROR' not handled in switch [-Wswitch] core/io/marshalls.cpp:806:9: warning: enumeration value 'AABB' not handled in switch [-Wswitch] Those can be trivial cases where adding a default fallback is the solution, or more complex issues/hidden bugs where missed values are actually meant to be handled.
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-4/+5
| | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Make some debug prints verbose-only, remove othersRémi Verschelde2018-08-241-6/+0
|
* Improved error checking at EditorExportPlatformPC::export_projectMarcelo Fernandez2018-03-061-3/+4
|
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* found via cppcheck:firefly24422018-01-031-3/+3
| | | | | | | remove code that will never run make definition and declaration names for parameters match change floats that were being set to bool values remove pointer that is never used
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Fix Windows-to-Linux export errorPedro J. Estébanez2017-12-061-0/+3
| | | | Now chmod() returns ERR_UNAVAILABLE by default, to signal the caller the problem is lack of support instead of a failed operation.
* Allow configuring iOS exportRuslan Mustakov2017-11-211-0/+97
| | | | | | | | | | | | | | | | | - EditorExportPlugin's _export_begin accepts all the arguments related to the current export (is_debug, path, flags). - EditorExportPlugin API is extended with methods allowing to configure iOS export: add_ios_framework, add_ios_plist_content, add_ios_linker_flags, add_ios_bundle_file. - iOS export template now contains Godot as a static library so that it can be linked with third-party Frameworks and GDNative static libraries. - Adds method to DirAccess for recursive copying of a directory. - Fixes iOS export to work with Xcode 9 (released recently).
* Rename OS::get_data_dir to OS::get_user_data_dirRémi Verschelde2017-11-171-2/+2
| | | | | Will be needed to avoid confusion with system data path (XDG_DATA_HOME) and editor data dir in upcoming refactoring.
* Rename pos to position in user facing methods and variablesletheed2017-09-201-1/+1
| | | | | | | | | | | Rename user facing methods and variables as well as the corresponding C++ methods according to the folloming changes: * pos -> position * rot -> rotation * loc -> location C++ variables are left as is.
* Fix x11 exported executables not getting the +x flagMarcelo Fernandez2017-09-171-1/+6
|
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Style: Apply clang-format on all filesRémi Verschelde2017-07-301-1/+1
| | | | Thus fixing some invalid changes that had still made it to the master branch.
* -Renamed GlobalConfig to ProjectSettings, makes more sense.Juan Linietsky2017-07-191-4/+4
| | | | -Added system for feature overrides, it's pretty cool :)
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-83/+68
| | | | | | | | | | | | | | | | | | | | | | | | I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
* -renamed globals.h to global_config.cpp (this seems to have caused a few ↵Juan Linietsky2017-02-211-1/+1
| | | | | | modified files) -.pck and .zip exporting redone, seems to be working..
* -Changed most project settings in the engine, so they have major and minor ↵Juan Linietsky2017-01-051-3/+3
| | | | | | | | categories. -Changed SectionedPropertyEditor to support this -Renamed Globals singleton to GlobalConfig, makes more sense. -Changed the logic behind persisten global settings, instead of the persist checkbox, a revert button is now available
* Welcome in 2017, dear changelog reader!Rémi Verschelde2017-01-011-1/+1
| | | | | | | | That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games!
* Fixed make_dir and make_dir_recursive erros, closes #1680 closes #1872Juan Linietsky2016-06-181-100/+34
|
* remove trailing whitespaceHubert Jarosz2016-03-091-11/+11
|
* Update copyright to 2016 in headersGeorge Marques2016-01-011-1/+1
|
* more fixesJuan Linietsky2015-05-191-0/+11
| | | | | | -only refuse to load an older file if version major is different, fixes #1944 -fix drive letter default value, fixes #1939