Commit Graph

206 Commits

Author SHA1 Message Date
Thaddeus Crews
bb5f390fb9
Style: Apply clang-tidy fixes (superficial)
• `modernize-use-bool-literals`, `modernize-use-nullptr`, and `readability-braces-around-statements`
2024-11-04 12:11:14 -06:00
Rémi Verschelde
ef7547384c
Merge pull request #95678 from Hilderin/fix-slow-load-on-large-project-v2
Fix slow editor load on large projects (v2)
2024-09-26 12:45:31 +02:00
Hilderin
21f7c8a25f Fix slow editor load on large projects (v2) 2024-09-25 17:36:39 -04:00
Thaddeus Crews
9f9ee0c813
SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
Rémi Verschelde
e9194702a3
Merge pull request #96840 from bruvzg/open_wstat
[Windows] Remove `_wstat` use in `FileAccessWindows::open_internal`
2024-09-11 12:34:28 +02:00
Rémi Verschelde
88e9af6b7c
Merge pull request #74830 from AThousandShips/win_time_fix
[Windows] Use `GetFileTime` for `FileAccess`
2024-09-11 12:34:18 +02:00
bruvzg
e16f8bae2e [Windows] Remove _wstat use in FileAccessWindows::open_internal 2024-09-11 09:48:09 +03:00
A Thousand Ships
7139f46c9a
[Windows] Use GetFileTime for FileAccess
Prevents DST from rearranging file times.
2024-09-06 13:53:46 +02:00
bruvzg
10f3c1f587
Add support for non-blocking IO mode to OS.execute_with_pipe. 2024-09-06 14:16:39 +03:00
Rémi Verschelde
527c716784
Merge pull request #92167 from BlueCube3310/file-access-the-final-season-part3-ep2
Reduce code duplication in FileAccess
2024-09-02 12:12:42 +02:00
Yahkub-R
6db8e3b6b1 Fix Windows importer issue with new file detection 2024-09-01 10:24:29 -04:00
BlueCube3310
205a10e0ae Reduce code duplication in FileAccess 2024-09-01 12:39:32 +02:00
bruvzg
b130cf0361 [Windows] Fix handling X: paths. 2024-08-29 15:58:59 +03:00
Saracen
6069cb3475 Fix Win32 rename function. 2024-08-29 03:54:02 +01:00
bruvzg
ae334e069c
[Windows] Always use absolute UNC paths and long path aware APIs, add "long path aware" flag to the application manifest. 2024-08-28 11:15:57 +03:00
Rémi Verschelde
32070144af
Merge pull request #91100 from bruvzg/x_finks
Add symlink API support for Windows, expose symlink methods.
2024-04-29 13:00:37 +02:00
bruvzg
fc948e87f6 Add symlink API support for Windows, expose symlink methods. 2024-04-28 19:59:34 +03:00
A Thousand Ships
3679ea5d26
[Windows] Improve warning for path casing. 2024-04-27 16:49:47 +02:00
bruvzg
88b3e68f93
[FileAccess] Implement resize method. 2024-04-12 19:20:49 +03:00
bruvzg
082b420c0a
Implement OS.execute_with_pipe method to run process with redirected stdio.
Implement `pipe://*` path handling for creation of named pipes.
2024-03-27 11:41:16 +02:00
Rémi Verschelde
3a08c646ee
Pre-commit: Update to clang-format 17.0.6 and black 24.2.0 2024-02-28 14:25:35 +01:00
Muller-Castro
a8bc9f3e78 Add const lvalue ref to core/* container parameters 2024-02-14 11:20:36 -03:00
GNSS-Stylist
c5e1b327c6
Fix invalid file path handling in Windows when there is dot in the file name
This basically re-adds dot-removal removed by the previous commit.
2024-02-13 10:39:03 +01:00
bruvzg
be8f60a78d [Windows] Fix windows is_path_invalid, and apply it to directory creation. 2024-02-09 10:47:07 +02:00
BlueCube3310
6ed1731746 Use platform-specific methods for FileAccess reading and writing 2023-10-29 17:34:18 +01:00
bruvzg
97bcd8a631 Add method to check if filesystem is case sensitive. 2023-10-09 11:00:15 +03:00
Rémi Verschelde
814ab59c37
Windows: Remove MSVC define redundant with _MSC_VER
Cleanup unused MSVC code in FileAccessUnix.
2023-09-26 11:11:45 +02:00
A Thousand Ships
3565d1bf7e [Drivers,Platform] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-12 20:13:32 +02:00
Rémi Verschelde
8de6405288
UWP: Remove platform port, needs to be redone from scratch for 4.x
The UWP platform port was never ported to the Godot 4.0+ API,
and it's now accumulating bitrot as it doesn't compile, and thus
we no longer propagate platform changes in it.

So we finally remove to acknowledge this state. There's still some
interest in reviving the UWP port eventually, especially as support
for Direct3D 12 will soon be merged, but when that happens it will
be easiest to redo it from scratch.
2023-09-07 15:01:59 +02:00
Pedro J. Estébanez
49177b6eeb Make Windows' safe save more resilient 2023-08-25 18:28:35 +02:00
bruvzg
8aa6f29b56
[FileAccess] Add methods to get/set "hidden" and "read-only" attributes on macOS/BSD and Windows. 2023-08-08 21:51:32 +03:00
Samuele Panzeri
59f04e16b8 Support long path in file access on windows
Changed windows file access file to check for path length and use the \\?\ long format when needed
2023-05-05 10:04:39 +02:00
Yuri Sizov
ea31842b72
Merge pull request #73156 from gw2cc/safe_save
Create a safe temporary file with is_backup_save_enabled
2023-03-16 12:05:48 +01:00
ACB
345f5757e5 Create a safe temporary file with is_backup_save_enabled 2023-03-15 19:36:07 +01:00
bruvzg
bc95b0b171
Restore FileAccess.close method. 2023-02-16 15:34:20 +02:00
Juan Linietsky
c5390f203d Prevent opening Windows console files
Fixes #20110.
2023-01-11 15:05:29 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
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".
2023-01-05 13:25:55 +01:00
bruvzg
0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
Rémi Verschelde
f501e4f665 Unix: Remove now unnecessary I/O defines, cleanup
- `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.
2022-10-03 12:33:41 +02:00
nikitalita
0d3d5ac769 Fix DirAccessWindows::make_dir() choking on ".."
`CreateDirectoryW()` chokes on absolute paths that contain `..`
example: "C:\\workspace\\..\\games\\assets"
Simplifying the path before creating the dir fixes this.
2022-09-26 12:24:02 -07:00
kobewi
9f2dc68279 Replace File/Directory with FileAccess/DirAccess 2022-09-19 11:03:31 +02:00
Aaron Franke
10a56981dc
Rename String plus_file to path_join 2022-08-29 19:38:13 -05:00
bitsawer
40325006b6 Fix Windows list dir handle leak 2022-08-15 20:27:29 +03:00
Marcel Admiraal
c06025fa13 Add override keywords to DirAccess derived classes 2022-08-02 16:39:44 +01:00
Marcel Admiraal
cafb19e608 Add override keywords to FileAccess derived classes 2022-08-02 16:35:15 +01:00
bruvzg
d2ebac3a30
Remove or make private FileAccess close() methods. 2022-04-12 14:50:14 +03:00
bruvzg
9381acb6a4
Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
Rémi Verschelde
b8b4580448
Style: Cleanup single-line blocks, semicolons, dead code
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
2022-02-16 14:06:29 +01:00
bruvzg
cba8280515 [Windows] Add support for handling network share paths. 2022-01-24 16:22:59 +02:00
Rémi Verschelde
ba2bdc478b
Style: Remove inconsistently used @author docstrings
Each file in Godot has had multiple contributors who co-authored it over the
years, and the information of who was the original person to create that file
is not very relevant, especially when used so inconsistently.

`git blame` is a much better way to know who initially authored or later
modified a given chunk of code, and most IDEs now have good integration to
show this information.
2022-01-04 20:42:50 +01:00