Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose std::filesystem::remove_all functionality to lua side as an argument for RemoveDir #63

Merged
merged 3 commits into from
Jan 21, 2025

Conversation

Paliak
Copy link
Contributor

@Paliak Paliak commented Aug 19, 2024

Current implementation of RemoveDir does not allow for removal of directories with content. This commit adds a recursive boolean parameter to RemoveDir allowing for recursive removal of directories and their contents.

See PathOfBuildingCommunity/PathOfBuilding#8197 for more discussion and potential use case.

Current implementation of RemoveDir does not allow for removal of
direcoties with content. This commit adds a recursive boolean parameter
to RemoveDir allowing for recursive removal of directories and their
contents.

PathOfBuildingCommunity/PathOfBuilding#8197
@Paliak Paliak added the enhancement New feature or request label Aug 19, 2024
Copy link
Member

@Wires77 Wires77 left a comment

Choose a reason for hiding this comment

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

Can we have the second parameter default to false here and not require both parameters?

@Paliak
Copy link
Contributor Author

Paliak commented Jan 19, 2025

@Wires77 That's how it works (should, been a while). The param assert is only triggered if n > 1 and recursive will be false when there's only 1 param.

@Wires77
Copy link
Member

Wires77 commented Jan 19, 2025

I was looking at the first usage of Lassert() and thinking that condition would fail if a second parameter wasn't passed in. I can build it test it myself to confirm though

@Paliak
Copy link
Contributor Author

Paliak commented Jan 19, 2025

Just noting for posterity.

I was wrong and i guess i designed the API to require the 2nd param for this func. Discussion moved to Discord.

LocalIdentity pushed a commit to PathOfBuildingCommunity/PathOfBuilding-PoE2 that referenced this pull request Jan 20, 2025
@Wires77 Wires77 merged commit 014f545 into PathOfBuildingCommunity:master Jan 21, 2025
LocalIdentity pushed a commit to PathOfBuildingCommunity/PathOfBuilding that referenced this pull request Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants