Skip to content

Add function ZIPReader::file_exists - #76860

Merged
akien-mga merged 1 commit into
godotengine:masterfrom
AThousandShips:zip_file_exists
Aug 16, 2023
Merged

Add function ZIPReader::file_exists#76860
akien-mga merged 1 commit into
godotengine:masterfrom
AThousandShips:zip_file_exists

Conversation

@AThousandShips

@AThousandShips AThousandShips commented May 8, 2023

Copy link
Copy Markdown
Member

Closes: godotengine/godot-proposals#6834

I assumed it should consider a file it can find but not open as it not existing, essentially as a "will it make read_file not throw an error"

@Calinou Calinou added this to the 4.x milestone May 8, 2023
@Swarkin

Swarkin commented May 9, 2023

Copy link
Copy Markdown
Contributor

Thanks, this helps a lot!

Before (Godot 4.0.2):
image

After compiling the editor from this PR and changing my code to use file_exists instead of get_files this is the result:
image

@AThousandShips

Copy link
Copy Markdown
Member Author

Thank you for providing a benchmark example

Comment thread modules/zip/doc_classes/ZIPReader.xml Outdated

@akien-mga akien-mga left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@akien-mga akien-mga modified the milestones: 4.x, 4.2 Aug 16, 2023
@akien-mga
akien-mga merged commit 3518a30 into godotengine:master Aug 16, 2023
@AThousandShips
AThousandShips deleted the zip_file_exists branch August 16, 2023 15:04
@akien-mga

Copy link
Copy Markdown
Member

Thanks!

@AThousandShips

Copy link
Copy Markdown
Member Author

Thank you!

BendyLand pushed a commit to BendyLand/voltaire that referenced this pull request Aug 2, 2026
BendyLand pushed a commit to BendyLand/voltaire that referenced this pull request Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants