How to read files on the device?
-
- Manual Inserter
- Posts: 1
- Joined: Mon Aug 23, 2021 5:24 pm
- Contact:
How to read files on the device?
I'm trying to make a mod that can backup blueprints by copying the "blueprint-storage.dat" file regularly, but Factorio doesn't seem to allow "io.open()" to read the file. What should I do?
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: How to read files on the device?
Factorio mods are sandboxed. Access to any kind of non-game data is not allowed, to keep determinisim across all platforms. You'll have to do it as an external script, not as a mod.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.