Vuo  2.3.2
Functions | Variables
VuoFileType.c File Reference

Description

VuoFileType implementation.

Definition in file VuoFileType.c.

Go to the source code of this file.

Functions

VuoFileType VuoFileType_makeFromJson (json_object *js)
 Decodes the JSON object js to create a new value. More...
 
json_objectVuoFileType_getJson (const VuoFileType value)
 Encodes value as a JSON object. More...
 
VuoList_VuoFileType VuoFileType_getAllowedValues (void)
 Returns a list of values that instances of this type can have. More...
 
char * VuoFileType_getSummary (const VuoFileType value)
 Returns a compact string representation of value. More...
 
static void VuoFileType_initExtensions (void)
 Parses the list of file type extensions. More...
 
bool VuoFileType_isFileOfType (const VuoText path, VuoFileType fileType)
 Returns true if path is of type fileType, based on the file extension. More...
 
json_objectVuoFileType_getExtensions (VuoFileType fileType)
 Returns a JSON array of file extensions for the specified fileType. More...
 

Variables

static const char * VuoFileType_extensionsJSON
 A map of the extensions for each file type. More...
 
static json_objectVuoFileType_extensions = NULL
 VuoFileType_extensionsJSON parsed. More...
 
static dispatch_once_t VuoFileType_extensionsInitialized = 0
 Whether VuoFileType_extensions has been initialized. More...
 

Function Documentation

◆ VuoFileType_initExtensions()

static void VuoFileType_initExtensions ( void  )
static

Parses the list of file type extensions.

Definition at line 190 of file VuoFileType.c.

Variable Documentation

◆ VuoFileType_extensions

json_object* VuoFileType_extensions = NULL
static

VuoFileType_extensionsJSON parsed.

Definition at line 49 of file VuoFileType.c.

◆ VuoFileType_extensionsInitialized

dispatch_once_t VuoFileType_extensionsInitialized = 0
static

Whether VuoFileType_extensions has been initialized.

Definition at line 50 of file VuoFileType.c.

◆ VuoFileType_extensionsJSON

const char* VuoFileType_extensionsJSON
static
Initial value:
"audio": ["wav", "aif", "aiff", "mp3", "mp2", "aac", "m4a", "ac3", "3gp", "amr"],
"image": ["png", "jpeg", "jpg", "gif", "bmp", "exr", "hdr", "psd", "raw", "cr2",
"dng", "dcr", "nef", "raf", "mos", "kdc", "tif", "tiff", "tga", "targa", "webp", "pct"],
"mesh": ["data"],
"movie": ["mov", "avi", "dv", "mpeg", "mpg", "mp2", "m4v", "mp4", "ogv", "gif", "qt"],
"scene": ["3ds", "dae", "obj", "dxf", "ply", "lwo", "lxo", "ac3d", "ms3d", "cob", "scn",
"irr", "irrmesh", "mdl", "md2", "md3", "pk3", "mdc", "md5", "m3", "smd", "ter",
"raw", "b3d", "q3d", "q3s", "nff", "off", "3dgs", "hmp", "ndo", "fbx", "blend", "stl"],
"feed": ["rss", "rdf"],
"app": ["app", "app/"],
"data": ["icc", "txt"],
"json": ["json"],
"table": ["csv", "tsv"],
"xml": ["xml"],
})

A map of the extensions for each file type.

Definition at line 32 of file VuoFileType.c.