Skip to main content

Thread: Defining a new file type


i looking defining new file type use in specific application. want specifically:

create zip file structure like
zip
ackage.xml //to describe contents , them
:<directory> // 0 or more times
:<file> // 1 or more times

questions:
1) have assign new mime type have given specific program handle this, or file extension affect in given way?
2) different mime type affect library libgsf recognising zip file?
3) know of way change mime types, googling has given me few answers, drowned out problems mime type associations?

if answer 1 or of these questions appreciate it, until time continue searching.

regards,
stephen.

first of afaik mime types detected magic number , not extensions!
don't need assign new mime type, mime type needed identify , via network can choose program can handle file (ex video totem if site return mime type etc)
create own file, , open , handle program, in linux/ubuntu, files recognized magic number (rename .mp3 .jpg example) default recognized zip, can either change mime type/magic number (not recommended) recommend new file association instead.
2) mime type can affect programs try open won't recognize magic zip number/signature , think it's not zip
3)according wikipedia.org pk\003\004 hex: 50 4b 03 04 (just open in hex editor ) beware if change non-registered mime browsers won't able accurate open (in case want stream example not case assume)
nevertheless recommend not changing


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk Defining a new file type


Ubuntu

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code