Plato on Github
Report Home
src/read/wscript.js
Maintainability
83.94
Lines of code
25
Difficulty
4.59
Estimated Errors
0.05
Function weight
By Complexity
By SLOC
/** * @file WScript specific File System implementation * @since 0.2.6 */ /*#ifndef(UMD)*/ "use strict"; /*global _GPF_FS_WSCRIPT_READING*/ // WScript OpenTextFile for reading value /*global _GPF_HOST*/ // Host types /*global _gpfMsFSO*/ // Scripting.FileSystemObject activeX /*global _gpfReadSetImplIf*/ // Set the read implementation if the host matches /*#endif*/ /*jshint wsh:true*/ /*eslint-env wsh*/ /*eslint-disable new-cap*/ // FileSystem object APIs are uppercased function _gpfReadWScript (path) { return new Promise(function (resolve) { var file = _gpfMsFSO.OpenTextFile(path, _GPF_FS_WSCRIPT_READING, false); resolve(file.ReadAll()); file.Close(); }); } _gpfReadSetImplIf(_GPF_HOST.WSCRIPT, _gpfReadWScript);