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

[Request/Windows] Add a function to get Special Folder paths #5

Open
vico93 opened this issue Apr 24, 2024 · 1 comment
Open

[Request/Windows] Add a function to get Special Folder paths #5

vico93 opened this issue Apr 24, 2024 · 1 comment

Comments

@vico93
Copy link

vico93 commented Apr 24, 2024

Basically, add a "wrap" to SHGetKnownFolderPath's Windows API function that would allow us to dynamically get the path of variable folders like My Documents/Documents, Saved Games and others that can be moved around by the computer user.

I didn't see anything similar on the documentation, if something that could achieve this already exists in nativefs, please disregard this idea and take my apologizes.

@EngineerSmith
Copy link
Owner

Sorry for not replying - I thought I did. While I see where you're coming from, NativeFS won't be as much as a useful tool as it is in love11. Love12 will allow you to access paths much like nativeFS allows now. So I would rather leave it as an archive with bug fixes from PRs to maintain compatibility. Rather than adding new features that could introduce bugs and features people would want from a separate library in the future.

I'll leave this issue open, as if others want to implement it in their code base. It isn't too difficult to call the window's API function with jit ffi. As it looks like a simple call if you pass in target folder ID and a null char ptr for it to return the path. (Just remember to clear the pointer using the window API as mentioned in the docs than leaving it alive, or trying to clear it with C's free)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants