File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -147,6 +147,7 @@ export type FileExtension =
147147 | 'parquet'
148148 | 'class'
149149 | 'arj'
150+ | 'cpio'
150151 ; // eslint-disable-line semi-style
151152
152153export type MimeType =
@@ -290,6 +291,7 @@ export type MimeType =
290291 | 'application/x-parquet'
291292 | 'application/java-vm'
292293 | 'application/x-arj'
294+ | 'application/x-cpio'
293295 ; // eslint-disable-line semi-style
294296
295297export type FileTypeResult = {
Original file line number Diff line number Diff line change @@ -149,6 +149,13 @@ class FileTypeParser {
149149 } ;
150150 }
151151
152+ if ( this . check ( [ 0xC7 , 0x71 ] ) ) {
153+ return {
154+ ext : 'cpio' ,
155+ mime : 'application/x-cpio' ,
156+ } ;
157+ }
158+
152159 if ( this . check ( [ 0x60 , 0xEA ] ) ) {
153160 return {
154161 ext : 'arj' ,
@@ -981,6 +988,13 @@ class FileTypeParser {
981988 }
982989 }
983990
991+ if ( this . checkString ( '070707' ) ) {
992+ return {
993+ ext : 'cpio' ,
994+ mime : 'application/x-cpio' ,
995+ } ;
996+ }
997+
984998 // -- 7-byte signatures --
985999
9861000 if ( this . checkString ( 'BLENDER' ) ) {
Original file line number Diff line number Diff line change 199199 " dwg" ,
200200 " parquet" ,
201201 " class" ,
202- " arj"
202+ " arj" ,
203+ " cpio"
203204 ],
204205 "dependencies" : {
205206 "readable-web-to-node-stream" : " ^3.0.2" ,
Original file line number Diff line number Diff line change @@ -366,6 +366,7 @@ Returns a `Set<string>` of supported MIME types.
366366- [` cfb` ](https://en.wikipedia.org/wiki/Compound_File_Binary_Format) - Compount File Binary Format
367367- [` chm` ](https://en.wikipedia.org/wiki/Microsoft_Compiled_HTML_Help) - Microsoft Compiled HTML Help
368368- [` class ` ](https://en.wikipedia.org/wiki/Java_class_file) - Java class file
369+ - [` cpio` ](https://en.wikipedia.org/wiki/Cpio) - Cpio archive
369370- [` cr2` ](https://fileinfo.com/extension/cr2) - Canon Raw image file (v2)
370371- [` cr3` ](https://fileinfo.com/extension/cr3) - Canon Raw image file (v3)
371372- [` crx` ](https://developer.chrome.com/extensions/crx) - Google Chrome extension
Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ export const extensions = [
144144 'parquet' ,
145145 'class' ,
146146 'arj' ,
147+ 'cpio' ,
147148] ;
148149
149150export const mimeTypes = [
@@ -287,4 +288,5 @@ export const mimeTypes = [
287288 'application/x-parquet' ,
288289 'application/java-vm' ,
289290 'application/x-arj' ,
291+ 'application/x-cpio' ,
290292] ;
Original file line number Diff line number Diff line change @@ -243,6 +243,10 @@ const names = {
243243 dwg : [
244244 'fixture-line-weights' ,
245245 ] ,
246+ cpio : [
247+ 'fixture-bin' ,
248+ 'fixture-ascii' ,
249+ ] ,
246250} ;
247251
248252// Define an entry here only if the file type has potential
You can’t perform that action at this time.
0 commit comments