Tells whether the filename is a regular file

@param string $path
@return bool
@access public
164121
function is_file($path)
    {
        $result = $this->_get_stat_cache_prop($path, 'type');
        if ($result === false) {
            return false;
        }
        return $result === NET_SFTP_TYPE_REGULAR;
    }
1150756
public static function checkPath($path)
    {
        if (!is_string($path)) {
            throw new InvalidArgumentException(sprintf("String expected as path, got '%s' instead", gettype($path)));
        }
        if (!file_exists($path)) {
            throw new InvalidArgumentException(sprintf("'%s' does not exist", $path));
        }

        if (!is_dir($path)) {
            throw new InvalidArgumentException(sprintf("'%s' is not a directory", $path));
        }

        if (!is_readable($path)) {
            throw new InvalidArgumentException(sprintf("'%s' is not readable", $path));
        }

        return true;
    }
669931
public static function isAbsolutePath($path)
    {
        if (isset($path[0]) and ($path[0] == '/' or $path[0] == '\\')) {
            return true;
        }
        if (preg_match('/^[A-Za-z0-9]+:/', $path) === 1) {
            return true;
        }
        return false;
    }
428596
public function isUploadedFile($path)
    {
        if (!$path) {
            return false;
        }
        if (mb_orig_strpos($path, $this->getUploadTempDir() . '/') !== 0) {
            return false;
        }
        foreach ($this->attrs->files as $file) {
            if ($file['tmp_name'] === $path) {
                return true;
            }
        }
        return false;
    }
914725
public static function containsDotfile($path)
    {
        $path = Path::canonicalize(Path::makeAbsolute($path, '/'));

        return preg_match('#/\.#', $path) == 1;
    }
660102
public static function isAbsolutePath($path): bool
    {
        return strspn($path, '/\\', 0, 1)
            || (strlen($path) > 3 && ctype_alpha($path[0])
                && ':' === $path[1]
                && strspn($path, '/\\', 2, 1)
            )
            || null !== parse_url($path, PHP_URL_SCHEME);
    }
5891
public static function isAbsolute($path)
    {
        if (($position = strpos($path, './')) !== false && $position <= 2) {
            return false;
        }
        if (strpos($path, ':') !== false) {
            return true;
        }
        if (substr($path, 0, 1) === '/') {
            return true;
        }
        return false;
    }
488353
public static function isAbsolute($path)
    {
        if (empty($path)) {
            return false;
        }

        return $path[0] === '/' ||
            preg_match('/^[A-Z]:\\\\/i', $path) ||
            substr($path, 0, 2) === '\\\\' ||
            self::isRegisteredStreamWrapper($path);
    }
168614
public static function isDirectory(string $path) : bool
    {
        try {
            return ErrorCatcher::run(static function() use ($path) {
                return is_dir($path);
            });
        } catch (\ErrorException $e) {
            throw new IoException('Error checking if ' . $path . ' is a directory', 0, $e);
        }
    }
992453
private function isAutomaticallyIgnored($path)
    {

        if (!$this->insideTemplateDirectory) {
            // Determine if the provided file is a composer.json file
            // that should be ignored automatically.
            if (!Str::startsWith('_template', $path) && $path == 'composer.json') {
                return true;
            }
        }

        foreach ($this->automaticallyResolvedIgnoredPaths as $ignoredPath) {
            if (Str::is($this->normalizePath($ignoredPath), $path)) {
                return true;
            }
        }

        return false;
    }
453411
function file_exists($path)
    {
        if ($this->use_stat_cache) {
            $path = $this->_realpath($path);

            $result = $this->_query_stat_cache($path);

            if (isset($result)) {
                // return true if $result is an array or if it's an stdClass object
                return $result !== false;
            }
        }

        return $this->stat($path) !== false;
    }
724327
protected static function isValidPath(string $path): bool
    {
        // http://tools.ietf.org/html/rfc3986#section-3
        // The scheme and path components are required, though the path may be
        // empty (no characters)
        if ($path === '') {
            return true;
        }

        // http://tools.ietf.org/html/rfc3986#section-3.3
        // path          = path-abempty    ; begins with "/" or is empty
        //               / path-absolute   ; begins with "/" but not "//"
        //               / path-noscheme   ; begins with a non-colon segment
        //               / path-rootless   ; begins with a segment
        //               / path-empty      ; zero characters
        //
        // path-abempty  = *( "/" segment )
        // path-absolute = "/" [ segment-nz *( "/" segment ) ]
        // path-noscheme = segment-nz-nc *( "/" segment )
        // path-rootless = segment-nz *( "/" segment )
        // path-empty    = 0<pchar>
        // segment       = *pchar
        // segment-nz    = 1*pchar
        // segment-nz-nc = 1*( unreserved / pct-encoded / sub-delims / "@" )
        //               ; non-zero-length segment without any colon ":"
        // pchar         = unreserved / pct-encoded / sub-delims / ":" / "@"
        $pattern = sprintf(
            '/\A(?:(?:[%s%s:@]|(?:%s))*\/?)*\z/',
            static::UNRESERVED_SET,
            static::SUB_DELIMS_SET,
            static::PCT_ENCODED_SET
        );

        return !!preg_match($pattern, $path);
    }
30597
public static function executable($path)
    {
        $path = Normalize::diskFullPath($path);

        if (!self::exist($path)) {
            return false;
        }

        return is_executable($path);
    }
751131
protected function _isString($path)
    {
        $path = $this->_getPathObject($path);

        if (!$this->_hasProperty($path)) {
            throw new CrudException("Document member '$path->dotted' does not exist");
        }

        $value = $this->_getProperty($path->dotted);

        if (is_string($value)) {
            return true;
        }

        return false;
    }
339132
public static function type(string $path): string
    {
        $result = @filetype($path);
        return $result !== false ? $result : '';
    }
1208640
public static function checkFolderPath($path){
      $path = substr($path,strpos($path,'/')+1);
      $path = explode('/',trim($path,'/'));
        foreach ( $path as $dir ){
          if ( !empty($dir) && !CKFinder_Connector_Utils_FileSystem::checkFolderName($dir) ){
            return false;
          }
        }

        return true;
    }
216653
public function isFile($path)
    {
        $metadata = $this->dropbox->getMetadata($this->pathRoot.$path);
        return is_array($metadata) && isset($metadata['is_dir']) && $metadata['is_dir']==false;
    }