1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

js,os: fix integer arithmetic; add Process.close() and os.is_readable() for VJS; Make tetris run on JS backend (#12940)

This commit is contained in:
playX
2021-12-23 12:36:42 +03:00
committed by GitHub
parent d3ccdfd75c
commit a2468e1e0c
7 changed files with 535 additions and 3 deletions

View File

@ -140,3 +140,14 @@ pub fn execvp(cmd string, args []string) ? {
pub fn stdin_resume() {
#$process.stdin.resume();
}
pub fn is_readable(path string) bool {
$if js_node {
res := false
#try { res.val = $fs.accessSync(path.str,$fs.constants.R_OK); } catch { res.val = false; }
return res
} $else {
return false
}
}