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

WIP: Add list used files command #160

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

illwieckz
Copy link
Member

@illwieckz illwieckz commented Feb 9, 2019

old commit by @slipher initially wrote for kharnov's purpose, was intensively used to clean-up the game packs from dust for 0.51 release. This is also very convenient to check if a file is loaded as expected, like for troubleshooting #159.

Note that some files are loaded dynamically, so be sure to have spawned any character model / weapon and have walked any possible menu to be sure every used file is listed.

I modified the patch a bit to make it working on the now-extracted engine directory, reverted to lowercase override and did some camelCase, whitespace and blank line bikeshedding.

I don't know why this was never merged before, is there any issue with it?

@DolceTriade
Copy link
Contributor

I feel like some combination of "which" and autocomplete somehow already does this.

@slipher
Copy link
Member

slipher commented Feb 10, 2019

This is not the only interface for opening a pak file, for example there is also FS::PakPath::ReadFile. So it's not exactly correct.

@illwieckz
Copy link
Member Author

To be sure we talk about the same thing: the purpose of this is to only list what's loaded because of it being used, not to list what's available.

@illwieckz
Copy link
Member Author

can we merge this?

@DolceTriade
Copy link
Contributor

This only handles stuff from the legacy code paths I think?

// Class representing an open zip archive

@illwieckz
Copy link
Member Author

I don't know what you are talking about 🤔

@illwieckz
Copy link
Member Author

illwieckz commented Mar 10, 2019

note that we can rename the listFiles command as listLoadedFiles since the purpose of the PR is to provide a way to list files that are loaded because needed (and no more), not to list all files available (that would be another command).

@illwieckz illwieckz changed the title Add list files command Add list used files command Mar 10, 2019
@illwieckz
Copy link
Member Author

I just renamed from listFiles to listUsedFiles since it basically prints the usedFiles list, and used makes more sense than loaded in this context.

@slipher
Copy link
Member

slipher commented Mar 10, 2019

It only counts files that were opened with FS_FOpenFileRead. The engine has other file APIs that don't go through this function, so the results are incomplete (therefore it should not be merged).

@illwieckz
Copy link
Member Author

Ah ok now I understand.

@illwieckz illwieckz added the T-Improvement Improvement for an existing feature label Mar 30, 2019
@illwieckz illwieckz added A-VFS T-Feature-Request Proposed new feature and removed T-Improvement Improvement for an existing feature labels Sep 6, 2020
@illwieckz illwieckz changed the title Add list used files command WIP: Add list used files command May 31, 2021
@illwieckz illwieckz marked this pull request as draft May 31, 2021 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-VFS T-Feature-Request Proposed new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants