src/Charcoal/Admin/Action/Tinymce/UploadImageAction.php
protected function isAbsolutePath($file)
    {
        return strspn($file, '/\\', 0, 1)
            || (strlen($file) > 3
                && ctype_alpha($file[0])
                && substr($file, 1, 1) === ':'
                && strspn($file, '/\\', 2, 1))
            || null !== parse_url($file, PHP_URL_SCHEME);
    }
protected function isAbsolutePath($file)
    {
        return strspn($file, '/\\', 0, 1)
            || (strlen($file) > 3
                && ctype_alpha($file[0])
                && substr($file, 1, 1) === ':'
                && strspn($file, '/\\', 2, 1))
            || null !== parse_url($file, PHP_URL_SCHEME);
    }
protected function isAbsolutePath ( $ file ) { return strspn ( $ file , '/\\' , 0 , 1 ) || ( strlen ( $ file ) > 3 && ctype_alpha ( $ file [ 0 ] ) && substr ( $ file , 1 , 1 ) === ':' && strspn ( $ file , '/\\' , 2 , 1 ) ) || null !== parse_url ( $ file , PHP_URL_SCHEME ) ; }
Determine if the given file path is am absolute path.

Note: Adapted from symfony\filesystem.

@see https://github.com/symfony/symfony/blob/v3.2.2/LICENSE

@param  string $file A file path.
@return boolean Returns TRUE if the given path is absolute. Otherwise, returns FALSE.
Determine if the given file path is am absolute path .