Skip to content

Instantly share code, notes, and snippets.

View index.html
html>
<head>
<title>main</title>
</head>
<body>
<script>
nw.Window.open('chrome://inspect')
const base = 'file:///home/hkaya/nw/app/';
@hkaya
hkaya / index.html
Created Aug 13, 2015
nw13 test-app index.html
View index.html
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
var fs = nw.require('fs');
console.log(fs.readdirSync('.')); // prints []
console.log(fs.readdirSync('..')); // prints []
console.log(fs.readdirSync('/')); // prints []
//console.log(fs.readdirSync('/tmp')); // throws ENOENT