summaryrefslogtreecommitdiffstats
path: root/drivers/unix/dir_access_unix.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Linux/BSD] Fix cross-device rename.bruvzg2024-10-021-1/+11
|
* [FileSystem Dock] Add symlink indicator and tooltip.bruvzg2024-09-061-0/+15
|
* Reduce and prevent unnecessary random-access to `List`A Thousand Ships2024-05-041-1/+1
| | | | | | | | | Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when accessing a single element) * Removed subscript operator, in favor of a more explicit `get` * Added conversion from `Iterator` to `ConstIterator` * Remade existing operations into other solutions when applicable
* [Unix / DirAccess] Fix removing directory symlinks with `remove`, ensure ↵bruvzg2024-04-121-2/+2
| | | | `erase_contents_recursive` is not following directory symlinks.
* [Linux] Implement DirAccess.is_case_sensitive for EXT4 and F2FS.bruvzg2023-10-131-0/+23
|
* Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicableA Thousand Ships2023-10-081-3/+3
|
* Linux/BSD: Add LINUXBSD_ENABLED define for non X11-related checksRémi Verschelde2023-01-161-2/+2
|
* 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".
* Merge pull request #66720 from qarmin/unintialized_memoryRémi Verschelde2022-10-051-6/+6
|\ | | | | | | Remove usage of unitialized variables
| * Remove usage of unitialized variablesRafał Mikrut2022-10-011-6/+6
| |
* | Unix: Remove now unnecessary I/O defines, cleanupRémi Verschelde2022-10-031-10/+2
|/ | | | | | | | | | | | | | | | - `LIBC_FILEIO_ENABLED` wasn't defined anywhere, even in _other platforms_. - `NO_NETWORK` is also never defined. It probably isn't enough anyway to disable network APIs in the current codebase. - `UNIX_SOCKET_UNAVAILABLE` is never defined in this code but used by some other platforms, clarify that. - `NO_STATVFS` can be removed as Android supports it since API level 19, which is our current min SDK level. It's also only used for `DirAccessUnix::get_space_left()` which is anyway overridden by `DirAccessJAndroid::get_space_left()` so it shouldn't make a difference. * Fixed documentation for `DirAccess.get_space_left()`. - `NO_FCNTL` is likely also a remnant of early Android days, in current NDK r23 it seems to be available. Also cleaned up unused `fcntl.h` includes. - `NO_ALLOCA` is never defined, and we use alloca in many places now.
* Rename String `plus_file` to `path_join`Aaron Franke2022-08-291-14/+14
|
* Code quality: Fix header guards consistencyRémi Verschelde2022-07-251-1/+1
| | | | | Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
* Allows parsing of invalid UTF-16 surrogates (can be encountered in Windows ↵bruvzg2022-07-071-2/+2
| | | | filenames) and some non-standard UTF-8 variants, makes Unicode parse errors more verbose.
* Add Desktop to file dialog drive on UnixShlomi2022-07-051-4/+13
|
* Add full support for Android scoped storage.Fredia Huya-Kouadio2022-07-051-4/+0
| | | | | This was done by refactoring directory and file access handling for the Android platform so that any general filesystem access type go through the Android layer. This allows us to validate whether the access is unrestricted, or whether it falls under scoped storage and thus act appropriately.
* 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"`