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

avm2: Implement AIR flash.filesystem.File [desktop-only] #14178

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

Conversation

evilpie
Copy link
Collaborator

@evilpie evilpie commented Nov 26, 2023

Preview. This only works on Desktop, because it uses the native Path APIs. Needs code for version gating and stubs for wasm.

@Dinnerbone
Copy link
Contributor

I know this is just a draft for now, but we need to avoid using std::fs and std::path in core. This all needs to be a backend, or it won't be portable or testable.

@Mesteery
Copy link

Mesteery commented Nov 27, 2023

Personally I already implemented it on a fork, it's not perfect nor clean. And the branch not up to date with upstream for now but you can find it here if you want:

https://github.com/Mesteery/ruffle/tree/partial-air/core/src/avm2/globals/flash/filesystem

@evilpie
Copy link
Collaborator Author

evilpie commented Nov 27, 2023

Personally I already implemented it on a fork, it's not perfect nor clean. And the branch not up to date with upstream for now but you can find it here if you want:

https://github.com/Mesteery/ruffle/tree/partial-air/core/src/avm2/globals/flash/filesystem

Oh that is very cool. I am probably going to work on finishing FileReference first and work on this only afterwards. If you are interested I think you could probably rebase it on top of #14157. Your backend abstraction is good to have.

@evilpie
Copy link
Collaborator Author

evilpie commented Feb 2, 2024

@Mesteery would you be interested in making a pull request for your work? We now have FileReference and some foundational AIR support already. The missing flash.filesystem.File support currently prevents even the most basic AIR applications from working.

@Mesteery
Copy link

Mesteery commented Feb 5, 2024

Why not. I'll look into making a PR. There are still some problems with paths, I should rewrite this part.

@evilpie
Copy link
Collaborator Author

evilpie commented Feb 5, 2024

Nice. I look forward to your PR. It might make sense to make the actual path completely opaque and only have some kind of file handle in the avm2 code, then all methods like "resolve path", "get storage path" etc. would just forward that to the backend.

@danielhjacobs danielhjacobs added air Adobe AIR avm2 AVM2 (ActionScript 3.0) issues waiting-on-author Waiting on the PR author to make the requested changes labels Mar 5, 2024
@Fancy2209
Copy link
Contributor

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
air Adobe AIR avm2 AVM2 (ActionScript 3.0) issues waiting-on-author Waiting on the PR author to make the requested changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants