Skip to content

WIP: Add list used files command - #160

Draft
illwieckz wants to merge 1 commit into
DaemonEngine:masterfrom
illwieckz:listfiles
Draft

WIP: Add list used files command#160
illwieckz wants to merge 1 commit into
DaemonEngine:masterfrom
illwieckz:listfiles

Conversation

@illwieckz

@illwieckz illwieckz commented Feb 9, 2019

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor

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

@slipher

slipher commented Feb 10, 2019

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
Member Author

can we merge this?

@DolceTriade

Copy link
Copy Markdown
Contributor

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

// Class representing an open zip archive

@illwieckz

Copy link
Copy Markdown
Member Author

I don't know what you are talking about 🤔

@illwieckz

illwieckz commented Mar 10, 2019

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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

slipher commented Mar 10, 2019

Copy link
Copy Markdown
Member

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
Copy Markdown
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.

3 participants