Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,13 +30,22 @@ exports.cpus = binding.getCPUs; | |
exports.type = binding.getOSType; | ||
exports.release = binding.getOSRelease; | ||
exports.networkInterfaces = binding.getInterfaceAddresses; | ||
|
||
exports.arch = function() { | ||
return process.arch; | ||
}; | ||
|
||
exports.platform = function() { | ||
return process.platform; | ||
}; | ||
|
||
exports.tmpDir = function() { | ||
return process.env.TMPDIR || | ||
process.env.TMP || | ||
process.env.TEMP || | ||
(process.platform === 'win32' ? 'c:\\windows\\temp' : '/tmp'); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
fb55
|
||
}; | ||
|
||
exports.getNetworkInterfaces = function() { | ||
return exports.networkInterfaces(); | ||
}; | ||
|
1 comment
on commit a11bf99
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reference, here's pythons current logic: http://docs.python.org/2/library/tempfile.html#tempfile.tempdir
Should this not use some windows env there tell where the windows directory exist and then add the
\\temp
postfix?I think it is
process.env.WINDIR + "\\temp"
.