Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/is-absolute/ drwxr-xr-x | |
| Viewing file: Select action/file-type: 'use strict';
var isRelative = require('is-relative');
var isWindows = require('is-windows');
/**
* Expose `isAbsolute`
*/
module.exports = isAbsolute;
/**
* Returns true if a file path is absolute.
*
* @param {String} `fp`
* @return {Boolean}
*/
function isAbsolute(fp) {
if (typeof fp !== 'string') {
throw new TypeError('isAbsolute expects a string.');
}
return isWindows() ? isAbsolute.win32(fp) : isAbsolute.posix(fp);
}
/**
* Test posix paths.
*/
isAbsolute.posix = function posixPath(fp) {
return fp.charAt(0) === '/';
};
/**
* Test windows paths.
*/
isAbsolute.win32 = function win32(fp) {
if (/[a-z]/i.test(fp.charAt(0)) && fp.charAt(1) === ':' && fp.charAt(2) === '\\') {
return true;
}
// Microsoft Azure absolute filepath
if (fp.slice(0, 2) === '\\\\') {
return true;
}
return !isRelative(fp);
};
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0048 ]-- |