git::ls_basic PHP Method

ls_basic() static public method

static public ls_basic ( $args = null, $paths = null )
    static function ls_basic($args = null, $paths = null)
    {
        $args = self::escargs($args);
        $paths = self::escargs($paths);
        $ls = rtrim(self::exec('ls-files -z ' . $args . ' -- ' . $paths));
        $files = array();
        if ($ls) {
            # Iterate objects
            $ls = explode("", $ls);
            foreach ($ls as $line) {
                if (!$line) {
                    continue;
                }
                $files[] = gb_normalize_git_name($line);
            }
        }
        return $files;
    }