Created
October 30, 2019 14:40
-
-
Save triacontane/c7834d2e63d3efb37bc85625faa42110 to your computer and use it in GitHub Desktop.
プロジェクト内のデータファイルを削除
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var filePath = 'img/pictures/00.png'; | |
| var path = require('path'); | |
| var base = path.dirname(process.mainModule.filename); | |
| var fullPath; | |
| if (StorageManager.canMakeWwwSaveDirectory()) { | |
| fullPath = path.join(base, filePath); | |
| } else { | |
| fullPath = path.join(path.dirname(base), filePath); | |
| } | |
| var fs = require('fs'); | |
| if (fs.existsSync(fullPath)) fs.unlinkSync(fullPath); |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
このスクリプトはローカル実行(Game.exe)でなければ動作しません。