aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/world/file/extension.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/library/lux/world/file/extension.lux')
-rw-r--r--stdlib/source/library/lux/world/file/extension.lux108
1 files changed, 108 insertions, 0 deletions
diff --git a/stdlib/source/library/lux/world/file/extension.lux b/stdlib/source/library/lux/world/file/extension.lux
new file mode 100644
index 000000000..12b6700be
--- /dev/null
+++ b/stdlib/source/library/lux/world/file/extension.lux
@@ -0,0 +1,108 @@
+... https://en.wikipedia.org/wiki/List_of_filename_extensions
+(.require
+ [library
+ [lux (.except)
+ [data
+ [text
+ ["%" \\format]]]
+ [meta
+ [macro
+ ["[0]" template]]]]])
+
+(def .public Extension
+ Text)
+
+(with_template [<ext> <name> <aliases>]
+ [(def .public <name>
+ Extension
+ (%.format "." <ext>))
+
+ (`` (with_template [<alias>]
+ [(def .public <alias> <name>)]
+
+ (,, (template.spliced <aliases>))
+ ))
+ ]
+
+ ... https://en.wikipedia.org/wiki/List_of_filename_extensions_(0%E2%80%939)
+ ["7z" compressed_7z_archive []]
+
+ ... https://en.wikipedia.org/wiki/List_of_filename_extensions_(A%E2%80%93E)
+ ["a" archive []]
+ ["aac" advanced_audio_coding []]
+ ["agda" agda_source_code []]
+ ["apk" android_application_package []]
+ ["asm" assembler_source_code []]
+
+ ["bin" binary []]
+ ["bz2" bzip2_archive []]
+ ["blend" blender_project []]
+
+ ["c" c_source_code [[c]]]
+ ["cpp" c++_source_code [[c++]]]
+ ["class" java_class []]
+ ["com" dos_program []]
+ ["cs" c#_source_code []]
+ ["css" css []]
+ ["csv" comma_separated_values [[csv]]]
+
+ ["d" d_source_code []]
+ ["dart" dart_source_code []]
+
+ ["el" emacs_lisp_source_code [[emacs_lisp]]]
+ ["elc" compiled_emacs_lisp_code []]
+ ["elf" executable_and_linkable_file []]
+ ["epub" electronic_publication []]
+ ["erl" erlang_source_code [[erlang]]]
+ ["exe" executable_program []]
+
+ ... https://en.wikipedia.org/wiki/List_of_filename_extensions_(F%E2%80%93L)
+ ["flame" apophysis_fractal []]
+
+ ["gpx" gps_exchange_format []]
+ ["gz" gzip_compressed_data []]
+
+ ["har" http_archive_format []]
+ ["h" c_header []]
+ ["html" html []]
+
+ ["iso" optical_disc_file_system []]
+
+ ["jar" java_archive [[jar]]]
+ ["java" java_source_code [[java]]]
+ ["js" javascript_source_code [[javascript] [js]]]
+ ["json" javascript_object_notation [[json]]]
+
+ ["ll" llvm_assembly []]
+ ["lua" lua_source_code [[lua]]]
+ ["lz" lzip_archive []]
+
+ ... https://en.wikipedia.org/wiki/List_of_filename_extensions_(M%E2%80%93R)
+ ["md" markdown []]
+ ["mid" musical_instrument_digital_interface [[midi]]]
+
+ ["o" object_code []]
+ ["ogg" vorbis_audio [[ogg]]]
+
+ ["pdf" portable_document_format [[pdf]]]
+ ["php" php_source_code [[php]]]
+ ["pom" maven_build_configuration []]
+ ["ps" postscript_source_code []]
+ ["py" python_source_code [[python]]]
+
+ ["rb" ruby_source_code [[ruby]]]
+
+ ... https://en.wikipedia.org/wiki/List_of_filename_extensions_(S%E2%80%93Z)
+ ["scm" scheme_source_code [[scheme]]]
+ ["sh" unix_shell_script []]
+ ["sql" structured_query_language [[sql]]]
+ ["svg" scalable_vector_graphics [[svg]]]
+
+ ["tar" tape_archive [[tar]]]
+ ["tmp" temporary_file []]
+ ["tsv" tab_separated_values []]
+
+ ["yaml" yaml [[yet_another_markup_language] [yaml_ain't_markup_language]]]
+
+ ["zip" zip_archive [[zip]]]
+ )