public function filePath($path)
    {
        $file = $this->realPath($path);
        if (!is_file($file)) {
            throw new \InvalidArgumentException(sprintf('The path is not a file: %s', $file));
        }

        return $path;
    }
public function filePath($path)
    {
        $file = $this->realPath($path);
        if (!is_file($file)) {
            throw new \InvalidArgumentException(sprintf('The path is not a file: %s', $file));
        }

        return $path;
    }
public function filePath ( $ path ) { $ file = $ this -> realPath ( $ path ) ; if ( ! is_file ( $ file ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The path is not a file: %s' , $ file ) ) ; } return $ path ; }
Validate a file path.

@param string $path

@return string
Validate a file path .