Method description:
The method will return the real path of the platform. Multiple paths are separated by ":" or ";".
Grammar:
path.delimiter
Since this method belongs to the path module, the path module needs to be introduced before use (var path= require(“path”) )
Receive parameters:
None
Example:
//Example on *nix systems:
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:Windowssystem32;C:Windows;C:Program Filesnodejs'
process.env.PATH.split(path.delimiter)
// returns
['C:Windowssystem32', 'C:Windows', 'C:Program Filesnodejs']
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn