Implement get_filesystem_type on macOS and Linux.#106386
Merged
Merged
Conversation
akien-mga
approved these changes
May 14, 2025
Member
|
So I assume the same bug as #106384 might be reproducible on Linux? |
Member
Author
Member
|
I think if we support Linux and not the various BSDs for this niche scenario, it's probably fine. |
Member
Author
|
Added Linux version as well, tested to detect exFAT, FAT32, and genetic FS like EXT and BTRFS. The list is copy-pasted from the header. But it seems to not work with FUSE (return generic |
get_filesystem_type on macOS.get_filesystem_type on macOS and Linux.
akien-mga
approved these changes
May 14, 2025
Calinou
reviewed
May 23, 2025
Calinou
approved these changes
May 23, 2025
Member
Calinou
left a comment
There was a problem hiding this comment.
Tested locally on macOS, it works as expected. Code looks good to me.
func _ready():
var da = DirAccess.open("res://")
print(da.get_filesystem_type())
print(da.is_case_sensitive("res://"))Prints:
APFS
false
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Should fix #106384
Note: there is the same function on Linux and BSDs, but returned data (and used header) seems to be different, and Linux version only contain magic numbers for the file system types.