protected function getFilenameRelativeToRoot($root_path)
    {
        // strip path from filename
        $result = ltrim(
            substr($this->getPathname(), strlen($root_path)),
            DIRECTORY_SEPARATOR
        );

        if ($result === '') {
            throw new \InvalidArgumentException(
                'File "' . $this->getPathname() . '" is not present in the '
                .'given root: ' . $root_path
            );
        }

        return $result;
    }
protected function getFilenameRelativeToRoot($root_path)
    {
        // strip path from filename
        $result = ltrim(
            substr($this->getPathname(), strlen($root_path)),
            DIRECTORY_SEPARATOR
        );

        if ($result === '') {
            throw new \InvalidArgumentException(
                'File "' . $this->getPathname() . '" is not present in the '
                .'given root: ' . $root_path
            );
        }

        return $result;
    }
protected function getFilenameRelativeToRoot ( $ root_path ) { // strip path from filename $ result = ltrim ( substr ( $ this -> getPathname ( ) , strlen ( $ root_path ) ) , DIRECTORY_SEPARATOR ) ; if ( $ result === '' ) { throw new \ InvalidArgumentException ( 'File "' . $ this -> getPathname ( ) . '" is not present in the ' . 'given root: ' . $ root_path ) ; } return $ result ; }
Returns the filename, relative to the given root.

@param string $root_path The root_path of which this file is composed.

@throws \InvalidArgumentException if file is not in the project root.

@return string

@todo this protected method is unused in this class... can it be removed?
Returns the filename relative to the given root .