Lines Matching defs:strip
302 * The $strip parameter allows you to strip a certain number of path components from the filenames
303 * found in the tar file, similar to the --strip-components feature of GNU tar. This is triggered when
304 * an integer is passed as $strip.
305 * Alternatively a fixed string prefix may be passed in $strip. If the filename matches this prefix,
308 * @param int|string $strip
310 public function strip($strip)
313 $striplen = strlen($strip);
314 if (is_int($strip)) {
315 // if $strip is an integer we strip this many path components
322 $filename = join('/', array_slice($parts, $strip));
327 // if strip is a string, we strip a prefix here
328 if (substr($filename, 0, $striplen) == $strip) {