src/PermCheck.php
protected function getRelativeFilename(SplFileInfo $file)
    {
        $filename = $file->getPathname();
        $regex = sprintf('#^(%s)/(.+)#', $this->directory);
        $matches = array();

        preg_match(
            $regex,
            $filename,
            $matches
        );

        return $matches[2];
    }
protected function getRelativeFilename(SplFileInfo $file)
    {
        $filename = $file->getPathname();
        $regex = sprintf('#^(%s)/(.+)#', $this->directory);
        $matches = array();

        preg_match(
            $regex,
            $filename,
            $matches
        );

        return $matches[2];
    }
protected function getRelativeFilename ( SplFileInfo $ file ) { $ filename = $ file -> getPathname ( ) ; $ regex = sprintf ( '#^(%s)/(.+)#' , $ this -> directory ) ; $ matches = array ( ) ; preg_match ( $ regex , $ filename , $ matches ) ; return $ matches [ 2 ] ; }
Get the relative name of the given file.

@param SplFileInfo $file The file to get the relative name for.

@return string
Get the relative name of the given file .