Posted 19 July 2012 - 09:18 PM
Description
This API offers some simple functions to manage file extensions. Some of you may remember this from my discontinued File Extension Mod. I figured I could at least recreate the API, and I even improved it a bit.
Functions
ext.has(sName, sExt*) – returns boolean
ext.hide(sName) – returns sName without extension
ext.put(sName, sExt) – returns sName with extension sExt
ext.type(sName) – returns type as string
ext.define(sExt,sType) – returns boolean indicating success
ext.defined(sExt) – returns boolean and type if true
* = optional
Defined types are reset upon shutdown, so including definitions in a startup program is recommended.
Download
http://pastebin.com/zHh4y7c9
or "pastebin get zHh4y7c9 ext"
This API offers some simple functions to manage file extensions. Some of you may remember this from my discontinued File Extension Mod. I figured I could at least recreate the API, and I even improved it a bit.
Functions
Spoiler
ext.get(sName) – returns extension or nilext.has(sName, sExt*) – returns boolean
ext.hide(sName) – returns sName without extension
ext.put(sName, sExt) – returns sName with extension sExt
ext.type(sName) – returns type as string
ext.define(sExt,sType) – returns boolean indicating success
ext.defined(sExt) – returns boolean and type if true
* = optional
Defined types are reset upon shutdown, so including definitions in a startup program is recommended.
Download
http://pastebin.com/zHh4y7c9
or "pastebin get zHh4y7c9 ext"