summaryrefslogtreecommitdiffstats
path: root/drivers/unix/dir_access_unix.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make FileAccess and DirAccess classes reference counted.bruvzg2022-04-111-2/+2
|
* Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde2022-02-161-6/+6
| | | | | Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Add / to the unix shortcut drive listHaoyu Qiu2021-12-151-0/+16
| | | | Also made `get_current_drive()` to pick the longest match on Unix.
* Replace String comparisons with "", String() to is_empty()Nathan Franke2021-12-091-2/+2
| | | | | | Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings
* Rename String::is_rel_path to String::is_relative_pathWilson E. Alvarez2021-08-291-13/+13
|
* Fix `Directory::get_space_left()` result on macOS and Linux.bruvzg2021-05-311-1/+1
|
* Add symlink API to the DirAccess (on macOS and Linux).bruvzg2021-05-221-0/+47
|
* Make all file access 64-bit (uint64_t)Pedro J. Estébanez2021-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix `url_decode` with mixed percent-encoding/Unicode strings. Treat Unix ↵bruvzg2021-04-301-5/+7
| | | | drive names as UTF-8 encoded.
* FileDialog: add Back/Forward buttons, add message for inaccessible folders.bruvzg2021-03-231-0/+22
|
* Unify URI encoding/decoding and add to C#Aaron Franke2021-01-281-1/+1
| | | | http_escape and percent_encode have been unified into uri_encode, and http_unescape and percent_decode have been unified into uri_decode.
* 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-2/+2
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Hides special folders in FileDialog for macOSHaoyu Qiu2020-09-281-1/+5
|
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-17/+32
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-24/+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.
* Replace NULL with nullptrlupoDharkael2020-04-021-7/+7
|
* Improve UX of drive lettersPedro J. Estébanez2020-03-031-1/+6
| | | | | | | | | | 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.
* 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.
* Optimize DirAccessUnix::get_next() for some file systemsHadrien2019-07-291-18/+13
| | | | | | | | | On some file systems, like ext4 on Linux, readdir() gives enough information to determine the entry type in order to avoid doing a stat() system call. Use this information and call stat() only if necessary: for file systems that do not support this feature and for links.
* Revert "Optimize DirAccessUnix::get_next() for some file systems"Geequlim2019-07-211-14/+10
|
* Optimize DirAccessUnix::get_next() for some file systemsHadrien2019-07-171-10/+14
| | | | | | | | On some file systems, like ext4 on Linux, readdir() gives enough information to determine the entry type in order to avoid doing a stat() system call. Use this information and call stat() only if necessary.
* 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-4/+1
|/
* Add function to obtain filesystem type from DirAccess.Juan Linietsky2019-01-211-0/+4
| | | | Change EditorFileSystem to not use directory modification times on FAT32, fixes #20946
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Attempt to avoid breaking people's workflows on the change from ↵Juan Linietsky2018-11-271-1/+1
| | | | 8ba0d513fa0068a241a25fbb6db09315fa3309cc
* Added missing path verification on Unix, closes #20762Juan Linietsky2018-11-221-0/+11
|
* Safer getcwd in DirAccessFabio Alessandrelli2018-10-071-3/+3
| | | | Fix [-Wunused-result]
* Fix warnings in Android platformRémi Verschelde2018-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | | Fixes the following Clang 7 warnings: ``` platform/android/os_android.h:240:16: warning: 'OS_Android::native_video_play' hides overloaded virtual function [-Woverloaded-virtual] platform/android/os_android.h:241:15: warning: 'OS_Android::native_video_is_playing' hides overloaded virtual function [-Woverloaded-virtual] platform/android/audio_driver_opensl.cpp:104:3: warning: suggest braces around initialization of subobject [-Wmissing-braces] platform/android/audio_driver_opensl.cpp:129:10: warning: unused variable 'numOutputs' [-Wunused-variable] platform/android/audio_driver_opensl.cpp:130:11: warning: unused variable 'deviceID' [-Wunused-variable] platform/android/java_glue.cpp:795:10: warning: unused variable 'clsio' [-Wunused-variable] platform/android/java_glue.cpp:890:12: warning: unused variable 'gob' [-Wunused-variable] platform/android/java_glue.cpp:592:13: warning: unused variable 'resized' [-Wunused-variable] platform/android/java_glue.cpp:593:13: warning: unused variable 'resized_reload' [-Wunused-variable] modules/mobile_vr/mobile_vr_interface.cpp:401:8: warning: unused variable 'aspect_ratio' [-Wunused-variable] drivers/unix/dir_access_unix.cpp:394:2: warning: THIS IS BROKEN [-W#warnings] ```
* Merge pull request #21982 from luzpaz/misc-typosRémi Verschelde2018-09-131-1/+1
|\ | | | | Misc. typos
| * Misc. typosluz.paz2018-09-121-1/+1
| | | | | | Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
* | Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-6/+7
|/ | | | | | 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.
* Revert "added get_creation_time function for gdscript"Juan Linietsky2018-08-101-20/+0
|
* added get_creation_time function for gdscriptDaniele Giuliani2018-05-161-0/+20
|
* Fix get_drive (bookmarks) in linux not workingPoommetee Ketson2018-02-211-1/+1
|
* [X11] Improving error detection in move_to_trashIskustvo2018-02-181-0/+1
|
* 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.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Only do 'drive' discovery on X11Hein-Pieter van Braam2017-09-141-4/+5
| | | | | | | | | | | | | As it turns out older versions of the Android NDK have mntent.h but not a complete implementation. If it did work it would most likely give the wrong results on Android anyway. This commit enables the UNIX drive discovery only for X11 We also missed '/run/media' (default for gnome desktops) in the list of places to look for 'drives' on Linux. Add that to the list also. This fixes #11270
* Merge pull request #11160 from marcelofg55/drive_funcs_x11Rémi Verschelde2017-09-131-2/+91
|\ | | | | Implemented DirAccess get_drive and get_drive_count for Linux
| * Implemented DirAccess get_drive and get_drive_count for LinuxMarcelo Fernandez2017-09-121-2/+91
| |
* | DirAccess constructor sets current_dir to an absolute pathsupagu2017-09-101-14/+6
|/
* Further symlink fixessupagu2017-09-061-16/+26
|
* Another take at fixing symlinksFabian Mathews2017-09-031-21/+23
|
* Dead code tells no talesRémi Verschelde2017-08-271-12/+0
|
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Revert "Reworked change_dir to support symlinks"Juan Linietsky2017-08-211-23/+22
|