Skip to content

Commit c5bf5a5

Browse files
committed
Added support for CPIO
1 parent 5b1fdc5 commit c5bf5a5

File tree

3 files changed

+79
-0
lines changed

3 files changed

+79
-0
lines changed

src/Format/Cpio.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Distill package.
5+
*
6+
* (c) Raul Fraile <raulfraile@gmail.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Distill\Format;
13+
14+
class Cpio extends AbstractFormat
15+
{
16+
/**
17+
* {@inheritdoc}
18+
*/
19+
public static function getCompressionRatioLevel()
20+
{
21+
return FormatInterface::RATIO_LEVEL_MIDDLE;
22+
}
23+
24+
/**
25+
* {@inheritdoc}
26+
*/
27+
public static function getExtensions()
28+
{
29+
return ['cpio'];
30+
}
31+
32+
/**
33+
* {@inheritdoc}
34+
*/
35+
public static function getClass()
36+
{
37+
return get_class();
38+
}
39+
}

src/Format/Shar.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Distill package.
5+
*
6+
* (c) Raul Fraile <raulfraile@gmail.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Distill\Format;
13+
14+
class Shar extends AbstractFormat
15+
{
16+
/**
17+
* {@inheritdoc}
18+
*/
19+
public static function getCompressionRatioLevel()
20+
{
21+
return FormatInterface::RATIO_LEVEL_MIDDLE;
22+
}
23+
24+
/**
25+
* {@inheritdoc}
26+
*/
27+
public static function getExtensions()
28+
{
29+
return ['shar'];
30+
}
31+
32+
/**
33+
* {@inheritdoc}
34+
*/
35+
public static function getClass()
36+
{
37+
return get_class();
38+
}
39+
}

src/Method/Command/x7zip.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public function isFormatSupported(Format\FormatInterface $format)
9494
$format instanceof Format\Bz2 ||
9595
$format instanceof Format\Cab ||
9696
$format instanceof Format\Chm ||
97+
$format instanceof Format\Cpio ||
9798
$format instanceof Format\Deb ||
9899
$format instanceof Format\Dmg ||
99100
$format instanceof Format\Gz ||

0 commit comments

Comments
 (0)