Files: efcf9fd06b02fa9bcd28681b4c777224e19702bb / test / test-50-path-as-buffer / test-x-index.js
557 bytesRaw
1 | ; |
2 | |
3 | var fs = require('fs'); |
4 | var path = require('path'); |
5 | var hasURL = typeof URL !== 'undefined'; |
6 | |
7 | var d = __dirname; |
8 | var f = path.join(__dirname, 'test-z-asset.css'); |
9 | |
10 | console.log(fs.statSync(f).size); |
11 | console.log(fs.statSync(Buffer.from(f)).size); |
12 | if (hasURL) console.log(fs.statSync(new URL('file://' + f)).size); |
13 | |
14 | console.log(fs.readdirSync(d).includes('test-z-asset.css')); |
15 | console.log(fs.readdirSync(Buffer.from(d)).includes('test-z-asset.css')); |
16 | if (hasURL) console.log(fs.readdirSync(new URL('file://' + d)).includes('test-z-asset.css')); |
17 |
Built with git-ssb-web