protected function _preProcess($resource)
    {
        // clear file / directory stats
        clearstatcache();

        // calculate hash
        $uid = $this->_getUid($resource);

        // already processed in current stack?
        if (!isset($this->resources[$uid])) {
            // remove trailing trash ...
            $resource = trim($resource, "\t\r\n\0\x0B");

            // check for containing BAD-stuff
            $this->_nullByteCheck($resource);

            // store the information
            $this->resources[$uid] = array(
                'resource' => $resource,
                'uid'      => $uid,
                'safe'     => true
            );
        }

        // map data to currentResource
        $this->setCurrentResourceInformation($this->resources[$uid]);

        // return safe resource
        return $resource;
    }