Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 18.188.80.46
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
unp-musonza /
node_modules /
locate-path /
Delete
Unzip
Name
Size
Permission
Date
Action
index.js
512
B
-rw-r--r--
2016-11-20 13:09
license
1.09
KB
-rw-r--r--
2016-10-25 18:55
package.json
1.66
KB
-rw-r--r--
2021-02-04 21:24
readme.md
1.51
KB
-rw-r--r--
2016-11-28 05:19
Save
Rename
# locate-path [](https://travis-ci.org/sindresorhus/locate-path) > Get the first path that exists on disk of multiple paths ## Install ``` $ npm install --save locate-path ``` ## Usage Here we find the first file that exists on disk, in array order. ```js const locatePath = require('locate-path'); const files = [ 'unicorn.png', 'rainbow.png', // only this one actually exists on disk 'pony.png' ]; locatePath(files).then(foundPath => { console.log(foundPath); //=> 'rainbow' }); ``` ## API ### locatePath(input, [options]) Returns a `Promise` for the first path that exists or `undefined` if none exists. #### input Type: `Iterable<string>` Paths to check. #### options Type: `Object` ##### concurrency Type: `number`<br> Default: `Infinity`<br> Minimum: `1` Number of concurrently pending promises. ##### preserveOrder Type: `boolean`<br> Default: `true` Preserve `input` order when searching. Disable this to improve performance if you don't care about the order. ##### cwd Type: `string`<br> Default: `process.cwd()` Current working directory. ### locatePath.sync(input, [options]) Returns the first path that exists or `undefined` if none exists. #### input Type: `Iterable<string>` Paths to check. #### options Type: `Object` ##### cwd Same as above. ## Related - [path-exists](https://github.com/sindresorhus/path-exists) - Check if a path exists ## License MIT © [Sindre Sorhus](https://sindresorhus.com)