# Functions
filecat.CatFromMime returns the file category based on the mime type -- not all Cats can be inferred from file types.
ExtSupported returns the supported type for given file extension, or NoSupport if not found or not a supported file type.
IsMatch returns true if given file type matches target type, which could be any of the Any options.
IsMatchList returns true if given file type matches any of a list of targets if list is empty, then always returns true.
MergeAvailMimes merges the StdMimes and CustomMimes into AvailMimes if CustomMimes is updated, then this should be called -- initially it just has StdMimes.
MimeFromFile gets mime type from file, using Gabriel Vasile's mimetype package, mime.TypeByExtension, the chroma syntax highlighter, CustomExtMimeMap, and finally FileExtMimeMap.
MimeNoChar returns the mime string without any charset encoding information, or anything else after a ;.
MimeString gives the string representation of the canonical mime type associated with given supported mime type.
MimeSub returns the sub-level subtype category from mime type i.e., the thing after the / -- returns empty if no / also trims off any charset encoding stuff.
MimeSupported returns the supported type for given mime key, or NoSupport if not found or not a supported file type.
MimeTop returns the top-level main type category from mime type i.e., the thing before the / -- returns empty if no /.
SupportedByName looks up supported file type by caps or lowercase name.
SupportedFromFile returns the supported type for given file, or NoSupport if not found or not a supported file type.
# Constants
These are the supported file types, organized by category.
These are the supported file types, organized by category.
Any is used when selecting a file type, if any type is OK (including NoSupport) see also AnySupported and the Any options for each category.
Archive is a collection of files, e.g., zip tar.
Audio is an audio file.
Backup files.
Bin is some other unrecognized binary type.
Code is a programming language file.
Data is some kind of data format (csv, json, database, etc).
Doc is an editable word processing file including latex, markdown, html, css, etc.
Exe is a binary executable file.
Folder is a folder / directory.
Font is a font file.
Image is an image (jpeg, png, svg, etc) *including* PDF.
Model is a 3D model.
Sheet is a spreadsheet file (.xls etc).
AnySupported is used when selecting a file type, if any Supported file type is OK (excludes NoSupport) -- see Any and Any options for each category.
Text is some other kind of text file.
Video is a video file.
Archive is a collection of files, e.g., zip tar.
Audio is an audio file.
These are the supported file types, organized by category.
Backup is a backup file (# ~ etc).
These are the supported file types, organized by category.
These are the supported file types, organized by category.
Bin is some other type of binary (object files, libraries, etc).
These are the supported file types, organized by category.
These are the supported file types, organized by category.
includes C++.
No description provided by the author
Code is a programming language file.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
Data is some kind of data format (csv, json, database, etc).
These are the super high-frequency used mime types, to have very quick const level support.
These are the super high-frequency used mime types, to have very quick const level support.
These are the super high-frequency used mime types, to have very quick const level support.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
Doc is an editable word processing file including latex, markdown, html, css, etc.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
Exe is a binary executable file (scripts go in Code).
These are the supported file types, organized by category.
Folder is a folder / directory.
Font is a font file.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
Image is an image (jpeg, png, svg, etc) *including* PDF.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
Model is a 3D model.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
NoSupport = a non-supported file type.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
text/plain mimetype -- used for clipboard.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
Sheet is a spreadsheet file (.xls etc).
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
Text is some other kind of text file.
These are the super high-frequency used mime types, to have very quick const level support.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
Unknown is an unknown file category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
Video is a video file.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
These are the supported file types, organized by category.
# Variables
AvailMimes is the full list (as a map from mimetype) of available defined mime types built from StdMimes (compiled in) and then CustomMimes can override.
CustomMimes can be set by other apps to contain custom mime types that go beyond what is in the standard ones, and can also redefine and override the standard one.
ExtMimeMap is the map from extension to mime type, built from AvailMimes.
No description provided by the author
No description provided by the author
StdMimes is the full list of standard mime types compiled into our code various other maps etc are constructed from it.
SupportedMimes maps from the support type into the MimeType info for each supported file type -- the supported MimeType may be just one of multiple that correspond to the supported type -- it should be first in list and have extensions defined.
# Type aliases
filecat.Cat is a functional category for files -- a broad functional categorization that can help decide what to do with the file.
filecat.Supported are file types that are specifically supported by GoGi and can be processed in one way or another, plus various others that we SHOULD be able to process at some point.