Query: file::mimeinfo::rox
OS: debian
Section: 3pm
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
File::MimeInfo::Rox(3pm) User Contributed Perl Documentation File::MimeInfo::Rox(3pm)NAMEFile::MimeInfo::Rox - Open files by mimetype "Rox style"SYNOPSISuse File::MimeInfo::Magic; use File::MimeInfo::Rox qw/:magic/; # open some file with the apropriate program mime_system($somefile); # more verbose version my $mt = mimetype($somefile) || die "Could not find mimetype for $somefile "; mime_system($somefile, $mt) || die "No program to open $somefile available ";DESCRIPTIONThis module tries to mimic the behaviour of the rox file browser <http://rox.sf.net> when "opening" data files. It determines the mime type and searches in rox's "Choices" directories for a program to handle that mimetype. See the rox documentation for an extensive discussion of this mechanism.EXPORTThe methods "mime_exec" and "mime_system" are exported, if you use the export tag ":magic" you get the same methods but File::MimeInfo::Magic will be used for mimetype lookup.ENVIRONMENTThe environment variable "CHOICESPATH" is used when searching for rox's config dirs. It defaults to "$ENV{HOME}/Choices:/usr/local/share/Choices:/usr/share/Choices"METHODS"mime_system($file)" "mime_system($file, $mimetype, @_)" Try to open $file with the appropriate program for files of it's mimetype. You can use $mimetype to force the mimetype. Also if you allready know the mimetype it saves a lot of time to just tell it. If either the mimetype couldn't be determinated or no appropriate program could be found "undef" is returned. If the actual system failes an exception is raised. All remaining arguments are passed on to the handler. "mime_exec($file)" "mime_exec($file, $mimetype, @_)" Like "mime_system()" but uses exec instead of system, so it never returns if successful. "suggest_script_name($mimetype)" Returns the list "($dir, $file)" for the suggested place to write new script files (or symlinks) for mimetype $mimetype. The suggested dir doesn't need to exist.BUGSPlease mail the author when you encounter any bugs.AUTHORJaap Karssenberg <pardus@cpan.org> Copyright (c) 2003, 2012 Jaap G Karssenberg. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.SEE ALSOFile::MimeInfo, File::MimeInfo::Magic, <http://rox.sourceforce.net> perl v5.14.2 2012-01-05 File::MimeInfo::Rox(3pm)
Related Man Pages |
---|
mimeopen(1p) - debian |
mimetypes(n) - osx |
mimetypes(5) - mojave |
file::mimeinfo::applications(3pm) - debian |
file::mimeinfo::rox(3pm) - debian |
Similar Topics in the Unix Linux Community |
---|
BeWelcome Rox 0.5 (Default branch) |
*nix File System Choices? |
I/O on File |
File Table full problem |
WebLogic - File Not Found |