Method description:
The method will return the real path of the platform, separated by multiples with ":" or ";".
grammar:
The code copy is as follows:
path.delimiter
Since this method belongs to the path module, you need to introduce the path module before use (var path= require("path") )
Receive parameters:
none
example:
The code copy is as follows:
//Example on *nix system:
console.log(process.env.PATH)
// '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin'
process.env.PATH.split(path.delimiter)
// returns
['/usr/bin', '/bin', '/usr/sbin', '/sbin', '/usr/local/bin']
Example on windows:
console.log(process.env.PATH)
// 'C:/Windows/system32;C:/Windows;C:/Program Files/nodejs/'
process.env.PATH.split(path.delimiter)
// returns
['C:/Windows/system32', 'C:/Windows', 'C:/Program Files/nodejs/']