Machine.config contains mime-mappings. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Rafael Teixeira Sent: den 17 mars 2010 16:14 To: [email protected] Subject: Re: Monorail, Mono, Content-type and the registry.....
'file' AFAIK is a shell script that searches the aforementioned shared-mime-info database (which I think is textual and contains extensions and magic bytes), I do think Mono already does the heavy lifting, perhaps substituting something else in Windows, too. Sorry can't get the time to search Mono's sources to be certain, asked on mono-dev-list to see if someone with more familiarity with the subject can enlighten us. Regards, Rafael "Monoman" Teixeira --------------------------------------- "To be creative means to be in love with life. You can be creative only if you love life enough that you want to enhance its beauty, you want to bring a little more music to it, a little more poetry to it, a little more dance to it." Osho On Wed, Mar 17, 2010 at 12:02 PM, Mauricio Scheffer <[email protected]> wrote: > I guess the ultimate solution would be porting the unix file command: > http://linux.die.net/man/1/file > I wonder if anyone has done this. > > On Mar 17, 11:54 am, Mauricio Scheffer <[email protected]> > wrote: >> Here's something I've been using:http://github.com/mausch/MobileRemoteBrowser/blob/master/MobileRemote. .. >> It has mappings by extension and magic bytes. It might not be complete >> but it points to other, more complete, sources. >> I'm using it through this wrapper:http://www.netomatix.com/Products/DocumentManagement/MimeDetector.as px >> but it shouldn't be hard to write one if you don't want to depend on >> 3rd party code. >> >> Cheers, >> Mauricio >> >> On Mar 17, 10:58 am, James Curran <[email protected]> wrote: >> >> >> >> > I've been working on implementing Portable Areas in Monorail. It's >> > about 95% done. One item I have left is setting the content type of a >> > file being read from a resource. Since I have it's extension, reading >> > that from the registry seem simple enough: >> >> > var contentType = >> > Microsoft.Win32.Registry.ClassesRoot.OpenSubKey(extension).GetValue("Conten t >> > Type") as string; >> >> > But, as Monorail is expected to compile under Mono, I assume that >> > means the Microsoft.* namespace is off-limits. What is the portable >> > way of doing this? > > -- > You received this message because you are subscribed to the Google Groups "Castle Project Development List" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to [email protected]. > For more options, visit this group at http://groups.google.com/group/castle-project-devel?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Castle Project Development List" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-devel?hl=en. -- You received this message because you are subscribed to the Google Groups "Castle Project Development List" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/castle-project-devel?hl=en.
