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

Misc file tweaks #399

Merged
merged 14 commits into from
May 6, 2021
Merged

Misc file tweaks #399

merged 14 commits into from
May 6, 2021

Conversation

TwitchBronBron
Copy link
Member

Migrated from #329 but targeting v1 branch instead of master.

Notable changes:

  • rename all instances of pathAbsolute to srcPath for brevity and clarity
  • pkgPath strings now contain an actual pkg path (i.e. "source/main.brs" is now "pkg:/source/main.brs")
  • pkgPath originally stored the platform-specific path separator (\ on windows, / on everything else). Now pkgPath always stores the unix separator because that's what is used on the roku device.
  • combine some of the program file functions to auto-detect the path type and use the correct file collection (this.files or this.pkgMap) accordingly.
  • program.files and program.pkgMap now store their keys in all lower case, which removes the need to iterate the collection to find files
  • Add a normalizePath: boolean parameter to program.getFile to support skipping util.standardizePath when the caller knows the path has already been normalized

@TwitchBronBron TwitchBronBron mentioned this pull request Apr 22, 2021
@TwitchBronBron TwitchBronBron merged commit 0c0b97e into v1 May 6, 2021
@TwitchBronBron TwitchBronBron deleted the misc-file-tweaks branch May 6, 2021 10:51
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

Successfully merging this pull request may close these issues.

1 participant