├── GspotDemo ├── Gspot │ └── readme ├── conf.lua ├── lovefs │ └── readme └── main.lua ├── LICENSE ├── LoveFramesDemo ├── LoveFrames │ └── readme ├── conf.lua ├── lovefs │ └── readme └── main.lua ├── LuigiDemo ├── conf.lua ├── lovefs │ └── readme ├── luigi │ └── readme └── main.lua ├── README.md ├── lovefs-noffi ├── README.md ├── codepages │ ├── 737 │ ├── 775 │ ├── 850 │ ├── 852 │ ├── 855 │ ├── 866 │ ├── 8859-1 │ ├── 8859-15 │ ├── 8859-16 │ ├── 8859-2 │ ├── 8859-4 │ ├── 8859-5 │ ├── 8859-7 │ ├── KOI8-R │ ├── KOI8-U │ ├── code.txt │ └── main.lua ├── conf.lua ├── dialogs.lua ├── file.png ├── folder.png ├── lovefs.lua ├── main.lua └── up.png └── lovefs ├── gspotDialog.lua ├── images ├── file.png ├── folder.png └── up.png ├── loveframesDialog.lua ├── lovefs.lua ├── lovefs_linux.lua ├── lovefs_osx.lua ├── lovefs_win.lua └── luigiDialog.lua /GspotDemo/Gspot/readme: -------------------------------------------------------------------------------- 1 | Placeholder for Gspöt library (https://notabug.org/pgimeno/Gspot) 2 | -------------------------------------------------------------------------------- /GspotDemo/conf.lua: -------------------------------------------------------------------------------- 1 | function love.conf(t) 2 | t.title = "LoveFS" -- The title of the window the game is in (string) 3 | t.author = "linux-man" -- The author of the game (string) 4 | t.url = nil -- The website of the game (string) 5 | t.identity = nil -- The name of the save directory (string) 6 | t.version = "11.0" -- The LÖVE version this game was made for (string) 7 | t.console = false -- Attach a console (boolean, Windows only) 8 | t.window.width = 800 -- The window width (number) 9 | t.window.height = 600 -- The window height (number) 10 | t.window.fullscreen = false -- Enable fullscreen (boolean) 11 | t.window.vsync = true -- Enable vertical sync (boolean) 12 | t.window.fsaa = 0 -- The number of FSAA-buffers (number) 13 | t.modules.joystick = false -- Enable the joystick module (boolean) 14 | t.modules.audio = true -- Enable the audio module (boolean) 15 | t.modules.keyboard = true -- Enable the keyboard module (boolean) 16 | t.modules.event = true -- Enable the event module (boolean) 17 | t.modules.image = true -- Enable the image module (boolean) 18 | t.modules.graphics = true -- Enable the graphics module (boolean) 19 | t.modules.timer = true -- Enable the timer module (boolean) 20 | t.modules.mouse = true -- Enable the mouse module (boolean) 21 | t.modules.sound = true -- Enable the sound module (boolean) 22 | t.modules.physics = false -- Enable the physics module (boolean) 23 | end 24 | -------------------------------------------------------------------------------- /GspotDemo/lovefs/readme: -------------------------------------------------------------------------------- 1 | Placeholder for loveFS 2 | -------------------------------------------------------------------------------- /GspotDemo/main.lua: -------------------------------------------------------------------------------- 1 | gui = require('Gspot/Gspot') 2 | require('lovefs/lovefs') 3 | require('lovefs/gspotDialog') 4 | 5 | love.load = function() 6 | fs = lovefs() 7 | local button = gui:button('Load Image', {0, 0, 200, 40}) 8 | button.click = function(this) 9 | save = false 10 | fs:loadDialog(gui, 'Load Image', {'All | *.*', 'Jpeg | *.jpg *.jpeg', 'Png | *.png', 'Bmp | *.bmp', 'Gif | *.gif'}) 11 | end 12 | local button = gui:button('Load Sound', {200, 0, 200, 40}) 13 | button.click = function(this) 14 | save = false 15 | fs:loadDialog(gui, 'Load Sound', {'Sound | *.mp3 *.wav', 'All | *.*'}) 16 | end 17 | local button = gui:button('Load TrueType', {400, 0, 200, 40}) 18 | button.click = function(this) 19 | save = false 20 | fs:loadDialog(gui, 'Load TrueType', {'TrueType | *.ttf', 'All | *.*'}) 21 | end 22 | saveButton = gui:button('Save Image (as png)', {600, 0, 200, 40}) 23 | saveButton.click = function(this) 24 | save = true 25 | fs:saveDialog(gui, 'Save Image') 26 | end 27 | saveButton:hide() 28 | end 29 | 30 | love.update = function(dt) 31 | gui:update(dt) 32 | if fs.selectedFile then 33 | ext = fs.selectedFile:match('[^'..fs.sep..']+$'):match('[^.]+$') 34 | if save then 35 | if newImage then fs:saveImage(newImage) end 36 | save = false 37 | elseif ext == 'jpg' or ext == 'png' or ext == 'bmp' then 38 | newImage = fs:loadImage() 39 | saveButton:show() 40 | elseif ext == 'mp3' or ext == 'wav' then 41 | sound = fs:loadSource() 42 | sound:play() 43 | 44 | elseif ext == 'ttf' then 45 | font = fs:loadFont(32) 46 | if font then love.graphics.setFont(font) end 47 | end 48 | end 49 | end 50 | 51 | love.draw = function() 52 | love.graphics.setColor(255, 255, 255) 53 | if newImage then 54 | love.graphics.draw(newImage, 0, 0, 0, math.min(800 / newImage:getWidth(), 600 / newImage:getHeight()), math.min(800 / newImage:getWidth(), 600 / newImage:getHeight())) 55 | end 56 | love.graphics.print('LoveFS Demo', 5, 550) 57 | gui:draw() 58 | end 59 | 60 | love.mousepressed = function(x, y, button) 61 | gui:mousepress(x, y, button) 62 | end 63 | 64 | love.mousereleased = function(x, y, button) 65 | gui:mouserelease(x, y, button) 66 | end 67 | 68 | love.wheelmoved = function(x, y) 69 | gui:mousewheel(x, y) 70 | end 71 | 72 | love.keypressed = function(key) 73 | if gui.focus then 74 | gui:keypress(key) 75 | end 76 | end 77 | 78 | love.textinput = function(key) 79 | if gui.focus then 80 | gui:textinput(key) 81 | end 82 | end 83 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2016 Caldas Lopes 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LoveFramesDemo/LoveFrames/readme: -------------------------------------------------------------------------------- 1 | Placeholder for LoveFrames library (https://github.com/linux-man/LoveFrames) 2 | -------------------------------------------------------------------------------- /LoveFramesDemo/conf.lua: -------------------------------------------------------------------------------- 1 | function love.conf(t) 2 | t.title = "LoveFS" -- The title of the window the game is in (string) 3 | t.author = "linux-man" -- The author of the game (string) 4 | t.url = nil -- The website of the game (string) 5 | t.identity = nil -- The name of the save directory (string) 6 | t.version = "11.0" -- The LÖVE version this game was made for (string) 7 | t.console = false -- Attach a console (boolean, Windows only) 8 | t.window.width = 800 -- The window width (number) 9 | t.window.height = 600 -- The window height (number) 10 | t.window.fullscreen = false -- Enable fullscreen (boolean) 11 | t.window.vsync = true -- Enable vertical sync (boolean) 12 | t.window.fsaa = 0 -- The number of FSAA-buffers (number) 13 | t.modules.joystick = false -- Enable the joystick module (boolean) 14 | t.modules.audio = true -- Enable the audio module (boolean) 15 | t.modules.keyboard = true -- Enable the keyboard module (boolean) 16 | t.modules.event = true -- Enable the event module (boolean) 17 | t.modules.image = true -- Enable the image module (boolean) 18 | t.modules.graphics = true -- Enable the graphics module (boolean) 19 | t.modules.timer = true -- Enable the timer module (boolean) 20 | t.modules.mouse = true -- Enable the mouse module (boolean) 21 | t.modules.sound = true -- Enable the sound module (boolean) 22 | t.modules.physics = false -- Enable the physics module (boolean) 23 | end 24 | -------------------------------------------------------------------------------- /LoveFramesDemo/lovefs/readme: -------------------------------------------------------------------------------- 1 | Placeholder for loveFS 2 | -------------------------------------------------------------------------------- /LoveFramesDemo/main.lua: -------------------------------------------------------------------------------- 1 | loveframes = require("LoveFrames") 2 | require 'lovefs/lovefs' 3 | require 'lovefs/loveframesDialog' 4 | 5 | function love.load() 6 | fsload = lovefs() 7 | fssave = lovefs() 8 | 9 | btload = loveframes.Create('button', window) 10 | btload:SetPos(0,0) 11 | btload:SetSize(200, 40) 12 | btload:SetText('Load Image') 13 | btload.OnClick = function(object) 14 | fsload:loadDialog(loveframes, nil, {'All | *.*', 'Jpeg | *.jpg *.jpeg', 'Png | *.png', 'Bmp | *.bmp', 'Gif | *.gif'}) 15 | end 16 | 17 | btlsnd = loveframes.Create('button', window) 18 | btlsnd:SetPos(200,0) 19 | btlsnd:SetSize(200, 40) 20 | btlsnd:SetText('Load Sound') 21 | btlsnd.OnClick = function(object) 22 | fsload:loadDialog(loveframes, nil, {'Sound | *.mp3 *.wav', 'All | *.*'}) 23 | end 24 | 25 | btlttf = loveframes.Create('button', window) 26 | btlttf:SetPos(400,0) 27 | btlttf:SetSize(200, 40) 28 | btlttf:SetText('Load TrueType') 29 | btlttf.OnClick = function(object) 30 | fsload:loadDialog(loveframes, nil, {'TrueType | *.ttf', 'All | *.*'}) 31 | end 32 | 33 | btsave = loveframes.Create('button', window) 34 | btsave:SetPos(600,0) 35 | btsave:SetSize(200, 40) 36 | btsave:SetText('Save Image (as png)') 37 | btsave.OnClick = function(object) 38 | fssave:saveDialog(loveframes) 39 | end 40 | end 41 | 42 | function love.update(dt) 43 | if fsload.selectedFile then 44 | ext = fsload.selectedFile:match('[^'..fsload.sep..']+$'):match('[^.]+$') 45 | if ext == 'jpg' or ext == 'png' or ext == 'bmp' then 46 | newImage = fsload:loadImage() 47 | elseif ext == 'mp3' or ext == 'wav' then 48 | sound = fsload:loadSource() 49 | sound:play() 50 | elseif ext == 'ttf' then 51 | font = fsload:loadFont(32) 52 | if font then love.graphics.setFont(font) end 53 | end 54 | end 55 | btsave.visible = newImage ~= nil 56 | if fssave.selectedFile then 57 | fssave:saveImage(newImage) 58 | end 59 | loveframes.update(dt) 60 | end 61 | 62 | function love.draw() 63 | love.graphics.setColor(255, 255, 255) 64 | if newImage then 65 | love.graphics.draw(newImage, 0, 0, 0, math.min(800 / newImage:getWidth(), 600 / newImage:getHeight()), math.min(800 / newImage:getWidth(), 600 / newImage:getHeight())) 66 | end 67 | if font then love.graphics.setFont(font) end 68 | love.graphics.print('LoveFS Demo', 5, 550) 69 | loveframes.draw() 70 | end 71 | 72 | function love.mousepressed(x, y, button) 73 | loveframes.mousepressed(x, y, button) 74 | end 75 | 76 | function love.mousereleased(x, y, button) 77 | loveframes.mousereleased(x, y, button) 78 | end 79 | 80 | function love.keypressed(key, unicode) 81 | loveframes.keypressed(key, unicode) 82 | end 83 | 84 | function love.keyreleased(key, unicode) 85 | loveframes.keyreleased(key) 86 | end 87 | 88 | function love.textinput(text) 89 | loveframes.textinput(text) 90 | end 91 | -------------------------------------------------------------------------------- /LuigiDemo/conf.lua: -------------------------------------------------------------------------------- 1 | function love.conf(t) 2 | t.title = "LoveFS" -- The title of the window the game is in (string) 3 | t.author = "linux-man" -- The author of the game (string) 4 | t.url = nil -- The website of the game (string) 5 | t.identity = nil -- The name of the save directory (string) 6 | t.version = "11.0" -- The LÖVE version this game was made for (string) 7 | t.console = false -- Attach a console (boolean, Windows only) 8 | t.window.width = 800 -- The window width (number) 9 | t.window.height = 600 -- The window height (number) 10 | t.window.fullscreen = false -- Enable fullscreen (boolean) 11 | t.window.vsync = true -- Enable vertical sync (boolean) 12 | t.window.fsaa = 0 -- The number of FSAA-buffers (number) 13 | t.modules.joystick = false -- Enable the joystick module (boolean) 14 | t.modules.audio = true -- Enable the audio module (boolean) 15 | t.modules.keyboard = true -- Enable the keyboard module (boolean) 16 | t.modules.event = true -- Enable the event module (boolean) 17 | t.modules.image = true -- Enable the image module (boolean) 18 | t.modules.graphics = true -- Enable the graphics module (boolean) 19 | t.modules.timer = true -- Enable the timer module (boolean) 20 | t.modules.mouse = true -- Enable the mouse module (boolean) 21 | t.modules.sound = true -- Enable the sound module (boolean) 22 | t.modules.physics = false -- Enable the physics module (boolean) 23 | end 24 | -------------------------------------------------------------------------------- /LuigiDemo/lovefs/readme: -------------------------------------------------------------------------------- 1 | Placeholder for loveFS 2 | -------------------------------------------------------------------------------- /LuigiDemo/luigi/readme: -------------------------------------------------------------------------------- 1 | Placeholder for LUIGI library (https://github.com/airstruck/luigi) 2 | -------------------------------------------------------------------------------- /LuigiDemo/main.lua: -------------------------------------------------------------------------------- 1 | require 'lovefs/lovefs' 2 | Layout = require 'luigi.layout' 3 | require 'lovefs/luigiDialog' 4 | 5 | local layout = Layout( 6 | {flow = 'x', 7 | {style = 'btn', id = 'loadImage', text = 'Load Image'}, 8 | {style = 'btn', id = 'loadSound', text = 'Load Sound'}, 9 | {style = 'btn', id = 'loadFont', text = 'Load TrueType'}, 10 | {style = 'btn', id = 'saveImage', text = 'Save Image'}, 11 | } 12 | ) 13 | 14 | layout:setStyle( 15 | { 16 | btn = { 17 | type = 'button', 18 | width = 200, 19 | height = 48, 20 | align = 'center middle' 21 | } 22 | } 23 | ) 24 | 25 | layout.loadImage:onPress(function (event) 26 | fs:loadDialog(Layout, 'Load Image', {'All | *.*', 'Jpeg | *.jpg *.jpeg', 'Png | *.png', 'Bmp | *.bmp', 'Gif | *.gif'}) 27 | save = false 28 | end) 29 | 30 | layout.loadSound:onPress(function (event) 31 | fs:loadDialog(Layout, 'Load Sound', {'Sound | *.mp3 *.wav', 'All | *.*'}) 32 | save = false 33 | end) 34 | 35 | layout.loadFont:onPress(function (event) 36 | fs:loadDialog(Layout, 'Load TrueType', {'TrueType | *.ttf', 'All | *.*'}) 37 | save = false 38 | end) 39 | 40 | layout.saveImage:onPress(function (event) 41 | fs:saveDialog(Layout, 'Save Image') 42 | save = true 43 | end) 44 | 45 | function love.load() 46 | fs = lovefs() 47 | layout:show() 48 | layout.saveImage.width = 0 49 | end 50 | 51 | function love.update(dt) 52 | if fs.selectedFile then 53 | ext = fs.selectedFile:match('[^'..fs.sep..']+$'):match('[^.]+$') 54 | if save then 55 | if newImage then fs:saveImage(newImage) end 56 | save = false 57 | elseif ext == 'jpg' or ext == 'png' or ext == 'bmp' then 58 | newImage = fs:loadImage() 59 | layout.saveImage.width = 200 60 | elseif ext == 'mp3' or ext == 'wav' then 61 | sound = fs:loadSource() 62 | sound:play() 63 | elseif ext == 'ttf' then 64 | font = fs:loadFont(32) 65 | if font then love.graphics.setFont(font) end 66 | end 67 | end 68 | 69 | end 70 | 71 | function love.draw() 72 | love.graphics.setColor(255, 255, 255) 73 | if newImage then 74 | love.graphics.draw(newImage, 0, 0, 0, math.min(800 / newImage:getWidth(), 600 / newImage:getHeight()), math.min(800 / newImage:getWidth(), 600 / newImage:getHeight())) 75 | end 76 | love.graphics.print('LoveFS Demo', 5, 550) 77 | end 78 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # lovefs 2 | 3 | Load and save files outside `love.filesystem`. 4 | 5 | ## with ffi 6 | 7 | The ffi code was mostly adapted (with my sincerest gratitude) from 8 | 9 | * [fi-luajit](https://github.com/nyfair/fi-luajit) (Windows) 10 | * [pflua](https://github.com/Igalia/pflua) (Posix). 11 | 12 | `attr` function was adapted from 13 | * [luafilesystem-ffi](https://github.com/3scale/luafilesystem-ffi/blob/master/lfs_ffi.lua) 14 | 15 | ```lua 16 | -- dir is [string], if no dir is given, start on UserDirectory 17 | fs = lovefs(dir) 18 | ``` 19 | ## [lovefs.lua](lovefs/lovefs.lua) 20 | 21 | ### members 22 | 23 | ```lua 24 | -- Current Directory [string] (don't change it, use fs:cd(dir)) 25 | fs.current 26 | 27 | -- drives, directories and files [tables] of current dir 28 | fs.drives 29 | fs.dirs 30 | fs.files 31 | fs.others (POSIX links and devices) 32 | fs.all 33 | 34 | -- [string] used by fs:loadImage, fs:loadSource, fs:loadFont and fs:saveImage if no source is given 35 | fs.selectedFile 36 | 37 | -- user directory [string] 38 | fs.home 39 | 40 | -- [table] with extensions, like {'jpg', 'png'}. Used by fs:ls to filter files. Don't forget to NIL! 41 | fs.filter 42 | 43 | -- Show or hide hidden files and directories. Default: FALSE 44 | fs.showHidden 45 | ``` 46 | 47 | ### methods 48 | 49 | ```lua 50 | -- update drives list 51 | fs:updDrives() 52 | ``` 53 | 54 | These functions accept absolute and relative (to current) paths: 55 | 56 | ```lua 57 | -- return dir (absolute path) [string], tDirs, tFiles, tOthers, tAll [tables]. Return FALSE if dir don't exist. Alias: fs:dir(dir) 58 | fs:ls(dir) 59 | 60 | -- return TRUE if exists [boolean] 61 | fs:exists(path) 62 | 63 | -- return TRUE if is directory. [boolean] 64 | fs:isDirectory(path) 65 | 66 | -- return TRUE if is file. [boolean] 67 | fs:isFile(path) 68 | 69 | -- Change directory. Populate fs.dirs and fs.files and fs.all with the new directory contents. Return TRUE if successful 70 | fs:cd(dir) 71 | 72 | -- move to parent directory (using cd()) 73 | fs:up() 74 | 75 | -- filter can be [nil, table or string]. sets fs.filter and calls fs:cd(). 76 | -- String can be 'File type | *.ext1 *.ext2' 77 | fs:setFilter(filter) 78 | 79 | -- switch fs.showHidden 80 | fs:switchHidden() 81 | 82 | -- return absolute paths 83 | fs:absPath(path) 84 | 85 | -- return image. Use fs.selectedFile if no source is given 86 | fs:loadImage(source) 87 | 88 | --return sound. Use fs.selectedFile if no source is given 89 | fs:loadSource(source) 90 | 91 | --return font. Use fs.selectedFile if no source is given 92 | fs:loadFont(size, source) 93 | 94 | -- Need Canvas support. Return FALSE on failure. Use fs.selectedFile if no source is given 95 | fs:saveImage(img, dest) 96 | 97 | -- copy file, this function only accept absolute paths 98 | fs:copy(source, dest) 99 | 100 | -- return a table of file attributes 101 | fs:attr(path) 102 | 103 | -- return a file attribute value 104 | fs:attr(path, attr) 105 | 106 | -- (POSIX systems: follow_Symlink[boolean]) 107 | fs:attr(path, [attr or nil], follow_symlink) 108 | ``` 109 | 110 | 111 | ## dialogs 112 | 113 | These are ready-made dialogs for various UI libraries. 114 | 115 | Example filter: 116 | 117 | ```lua 118 | {'All | *.*', 'Image | *.jpg *.png *.bmp', 'Sound | *.mp3 *.wav'} 119 | ``` 120 | 121 | When the user presses OK, the selected file is available in `fs.selectedFile` 122 | 123 | ### [luigiDialog.lua](lovefs/luigiDialog.lua) 124 | 125 | Use this to make a file-browser dialog with [LUIGI](https://love2d.org/wiki/LUIGI). 126 | 127 | ```lua 128 | -- show a load dialog, without a layout 129 | fs:loadDialog(gui, label, filters) 130 | 131 | -- use with a layout 132 | fs:loadDialog(gui.Layout, label, filters) 133 | 134 | 135 | -- show a save dialog, without a layout 136 | fs:saveDialog(gui, label) 137 | 138 | -- use with a layout 139 | fs:saveDialog(gui.Layout, label) 140 | ``` 141 | 142 | ### [loveframesDialog.lua](lovefs/loveframesDialog.lua) 143 | 144 | Use this to make a file-browser dialog with [loveframes](https://github.com/linux-man/LoveFrames). 145 | 146 | ```lua 147 | -- show a load dialog 148 | fs:loadDialog(lf, label, filters) 149 | 150 | -- show a save dialog 151 | fs:saveDialog(lf, label) 152 | ``` 153 | 154 | ### [gspotDialog.lua](lovefs/gspotDialog.lua) 155 | 156 | Use this to make a file-browser dialog with [gspot](https://notabug.org/pgimeno/Gspot). 157 | 158 | ```lua 159 | -- show a load dialog 160 | fs:loadDialog(gspot, label, filters) 161 | 162 | -- show a save dialog 163 | fs:saveDialog(gspot, label) 164 | ``` 165 | 166 | ### slab 167 | 168 | [Slab](https://github.com/coding-jackalope/Slab) has some nice UI elements built-in, that use this library, as well. 169 | 170 | ### attr example 171 | ```lua 172 | require('lovefs') 173 | fs = lovefs() 174 | fs:ls() 175 | 176 | print('Current Dir:', fs.current) 177 | for key, value in pairs(fs.all) do 178 | print(key, value) 179 | t = fs:attr(fs:absPath(value)) 180 | for _, a in pairs(t) do 181 | print('\t', _, a) 182 | end 183 | print('\t', 'Human readable timestamp') 184 | print('\t', 'modification', os.date(_, tostring(t['modification'], 'atime'))) 185 | print('\t', 'access', os.date(_, tostring(t['access'], 'atime'))) 186 | print('\t', 'change', os.date(_, tostring(t['change'], 'atime'))) 187 | end 188 | 189 | -- POSIX Symlinks 190 | print('Following links') 191 | for key, value in pairs(fs.others) do 192 | print(key, value) 193 | t = fs:attr(fs:absPath(value), nil, true) 194 | for _, a in pairs(t) do 195 | print('\t', _, a) 196 | end 197 | print('\t', 'Human readable timestamp') 198 | print('\t', 'modification', os.date(_, tostring(t['modification'], 'atime'))) 199 | print('\t', 'access', os.date(_, tostring(t['access'], 'atime'))) 200 | print('\t', 'change', os.date(_, tostring(t['change'], 'atime'))) 201 | end 202 | 203 | --[[ 204 | attribs = { 205 | "access", 206 | "blksize", 207 | "blocks", 208 | "change", 209 | "dev", 210 | "gid", 211 | "ino", 212 | "mode", 213 | "modification", 214 | "nlink", 215 | "permissions", 216 | "rdev", 217 | "size", 218 | "uid"} 219 | 220 | "target" for symlinks 221 | ]]-- 222 | ``` 223 | ## without ffi 224 | 225 | You can also use [lovefs-noffi](./lovefs-noffi), if you need support for pre-ffi love2d (before love 11), or you just don't want to use FFI. It has it's own [README](lovefs-noffi/README.md). It uses `popen` to call commands from the OS, so it's a bit slower, but maybe more cross-platform, in some situations. 226 | -------------------------------------------------------------------------------- /lovefs-noffi/README.md: -------------------------------------------------------------------------------- 1 | # lovefs-noffi 2 | 3 | This is an old, unmaintained version of loveFS, hosted here for historical and affective reasons. Only usefull if there is no "ffi" access (like in the case of love pre-11.) 4 | 5 | ### Reference: 6 | 7 | ```lua 8 | -- if no dir is given, start on UserDirectory 9 | fs = lovefs(dir[string]) 10 | ``` 11 | 12 | ## [lovefs.lua](lovefs.lua) 13 | 14 | ### members 15 | 16 | ```lua 17 | -- Current Directory [string] (don't change it, use fs:cd(dir)) 18 | fs.current 19 | 20 | -- [tables] drives directories and files in current dir 21 | fs.drives 22 | fs.files 23 | fs.dirs 24 | ``` 25 | 26 | ### methods 27 | 28 | ```lua 29 | -- Used by :cd() to populate fs.dirs and fs.files 30 | fs:setParam(param) 31 | 32 | -- return file list (table and string). Alias: fs:dir(param, dir) 33 | fs:ls(param, dir) 34 | 35 | -- return drives (table) 36 | fs:lsDrives() 37 | 38 | -- return directories (table and string) 39 | fs:lsDirs(param, dir) 40 | 41 | -- return files (table and string) 42 | fs:lsFiles(param, dir) 43 | 44 | -- return TRUE if exists. 45 | fs:exists(name, dir) 46 | 47 | -- return TRUE if directory. 48 | fs:isDirectory(name, dir) 49 | 50 | -- return TRUE if is file. 51 | fs:isFile(name, dir) 52 | 53 | -- Change directory. Populate fs.dirs and fs.files with the new directory contents. 54 | -- Note: if dir is NIL current directory is used 55 | fs:cd(dir) 56 | 57 | -- same as fs:cd:('..') 58 | fs:up() 59 | 60 | -- copy file 61 | fs:copy(source, dest) 62 | 63 | -- return image 64 | fs:loadImage(source) 65 | 66 | --return sound 67 | fs:loadSource(source) 68 | 69 | --return font 70 | fs:loadFont(size, source) 71 | 72 | -- Need Canvas support. Return FALSE on failure 73 | fs:saveImage(img, dest) 74 | ``` 75 | 76 | #### internal 77 | 78 | These are for internal-use, but you might need them for something: 79 | 80 | ```lua 81 | -- Load terminal codepage. Use only for testing. Return FALSE if codepage is not supported. 82 | -- Supported codepages: '737', '775', '850', '852', '855', '866', '8859-1', '8859-2', '8859-4', '8859-5', '8859-7', '8859-15', '8859-16', 'KOI8-R', 'KOI8-U' 83 | fs:loadCp(codepage[string]) 84 | 85 | -- translate string to utf-8 86 | fs:toUtf8(str) 87 | 88 | -- translate string to current codepage 89 | fs:toCp(str) 90 | 91 | -- return Windows path in 8.3 format 92 | fs:path8p3(dir, all) 93 | 94 | -- Execute command on console 95 | fs:run(command) 96 | ``` 97 | 98 | ### [dialogs.lua](dialogs.lua) 99 | 100 | Load and Save Dialog using [loveframes](https://github.com/linux-man/LoveFrames) (modified.) 101 | 102 | ```lua 103 | -- create a load-dialog 104 | dialog = loadDialog(window_fs, filters) 105 | 106 | -- create a save-dialog 107 | dialog = saveDialog(window_fs, filters) 108 | ``` 109 | 110 | Example: 111 | 112 | ```lua 113 | fs = fsload() 114 | dialog = loadDialog(fs, {'All | *.*', 'Images | *.jpg *.bmp *.png'}) 115 | ``` 116 | 117 | On close with OK, the path of the chosen file is at `fs.selectedFile` 118 | -------------------------------------------------------------------------------- /lovefs-noffi/codepages/737: -------------------------------------------------------------------------------- 1 | \206\145 2 | \206\146 3 | \206\147 4 | \206\148 5 | \206\149 6 | \206\150 7 | \206\151 8 | \206\152 9 | \206\153 10 | \206\154 11 | \206\155 12 | \206\156 13 | \206\157 14 | \206\158 15 | \206\159 16 | \206\160 17 | \206\161 18 | \206\163 19 | \206\164 20 | \206\165 21 | \206\166 22 | \206\167 23 | \206\168 24 | \206\169 25 | \206\177 26 | \206\178 27 | \206\179 28 | \206\180 29 | \206\181 30 | \206\182 31 | \206\183 32 | \206\184 33 | \206\185 34 | \206\186 35 | \206\187 36 | \206\188 37 | \206\189 38 | \206\190 39 | \206\191 40 | \207\128 41 | \207\129 42 | \207\131 43 | \207\130 44 | \207\132 45 | \207\133 46 | \207\134 47 | \207\135 48 | \207\136 49 | \226\150\145 50 | \226\150\146 51 | \226\150\147 52 | \226\148\130 53 | \226\148\164 54 | \226\149\161 55 | \226\149\162 56 | \226\149\150 57 | \226\149\149 58 | \226\149\163 59 | \226\149\145 60 | \226\149\151 61 | \226\149\157 62 | \226\149\156 63 | \226\149\155 64 | \226\148\144 65 | \226\148\148 66 | \226\148\180 67 | \226\148\172 68 | \226\148\156 69 | \226\148\128 70 | \226\148\188 71 | \226\149\158 72 | \226\149\159 73 | \226\149\154 74 | \226\149\148 75 | \226\149\169 76 | \226\149\166 77 | \226\149\160 78 | \226\149\144 79 | \226\149\172 80 | \226\149\167 81 | \226\149\168 82 | \226\149\164 83 | \226\149\165 84 | \226\149\153 85 | \226\149\152 86 | \226\149\146 87 | \226\149\147 88 | \226\149\171 89 | \226\149\170 90 | \226\148\152 91 | \226\148\140 92 | \226\150\136 93 | \226\150\132 94 | \226\150\140 95 | \226\150\144 96 | \226\150\128 97 | \207\137 98 | \206\172 99 | \206\173 100 | \206\174 101 | \207\138 102 | \206\175 103 | \207\140 104 | \207\141 105 | \207\139 106 | \207\142 107 | \206\134 108 | \206\136 109 | \206\137 110 | \206\138 111 | \206\140 112 | \206\142 113 | \206\143 114 | \194\177 115 | \226\137\165 116 | \226\137\164 117 | \206\170 118 | \206\171 119 | \195\183 120 | \226\137\136 121 | \194\176 122 | \226\136\153 123 | \194\183 124 | \226\136\154 125 | \226\129\191 126 | \194\178 127 | \226\150\160 128 | \194\160 129 | -------------------------------------------------------------------------------- /lovefs-noffi/codepages/775: -------------------------------------------------------------------------------- 1 | \196\134 2 | \195\188 3 | \195\169 4 | \196\129 5 | \195\164 6 | \196\163 7 | \195\165 8 | \196\135 9 | \197\130 10 | \196\147 11 | \197\150 12 | \197\151 13 | \196\171 14 | \197\185 15 | \195\132 16 | \195\133 17 | \195\137 18 | \195\166 19 | \195\134 20 | \197\141 21 | \195\182 22 | \196\162 23 | \194\162 24 | \197\154 25 | \197\155 26 | \195\150 27 | \195\156 28 | \195\184 29 | \194\163 30 | \195\152 31 | \195\151 32 | \194\164 33 | \196\128 34 | \196\170 35 | \195\179 36 | \197\187 37 | \197\188 38 | \197\186 39 | \226\128\157 40 | \194\166 41 | \194\169 42 | \194\174 43 | \194\172 44 | \194\189 45 | \194\188 46 | \197\129 47 | \194\171 48 | \194\187 49 | \226\150\145 50 | \226\150\146 51 | \226\150\147 52 | \226\148\130 53 | \226\148\164 54 | \196\132 55 | \196\140 56 | \196\152 57 | \196\150 58 | \226\149\163 59 | \226\149\145 60 | \226\149\151 61 | \226\149\157 62 | \196\174 63 | \197\160 64 | \226\148\144 65 | \226\148\148 66 | \226\148\180 67 | \226\148\172 68 | \226\148\156 69 | \226\148\128 70 | \226\148\188 71 | \197\178 72 | \197\170 73 | \226\149\154 74 | \226\149\148 75 | \226\149\169 76 | \226\149\166 77 | \226\149\160 78 | \226\149\144 79 | \226\149\172 80 | \197\189 81 | \196\133 82 | \196\141 83 | \196\153 84 | \196\151 85 | \196\175 86 | \197\161 87 | \197\179 88 | \197\171 89 | \197\190 90 | \226\148\152 91 | \226\148\140 92 | \226\150\136 93 | \226\150\132 94 | \226\150\140 95 | \226\150\144 96 | \226\150\128 97 | \195\147 98 | \195\159 99 | \197\140 100 | \197\131 101 | \195\181 102 | \195\149 103 | \194\181 104 | \197\132 105 | \196\182 106 | \196\183 107 | \196\187 108 | \196\188 109 | \197\134 110 | \196\146 111 | \197\133 112 | \226\128\153 113 | \194\173 114 | \194\177 115 | \226\128\156 116 | \194\190 117 | \194\182 118 | \194\167 119 | \195\183 120 | \226\128\158 121 | \194\176 122 | \226\136\153 123 | \194\183 124 | \194\185 125 | \194\179 126 | \194\178 127 | \226\150\160 128 | \194\160 129 | -------------------------------------------------------------------------------- /lovefs-noffi/codepages/850: -------------------------------------------------------------------------------- 1 | \195\135 2 | \195\188 3 | \195\169 4 | \195\162 5 | \195\164 6 | \195\160 7 | \195\165 8 | \195\167 9 | \195\170 10 | \195\171 11 | \195\168 12 | \195\175 13 | \195\174 14 | \195\172 15 | \195\132 16 | \195\133 17 | \195\137 18 | \195\166 19 | \195\134 20 | \195\180 21 | \195\182 22 | \195\178 23 | \195\187 24 | \195\185 25 | \195\191 26 | \195\150 27 | \195\156 28 | \195\184 29 | \194\163 30 | \195\152 31 | \195\151 32 | \198\146 33 | \195\161 34 | \195\173 35 | \195\179 36 | \195\186 37 | \195\177 38 | \195\145 39 | \194\170 40 | \194\186 41 | \194\191 42 | \194\174 43 | \194\172 44 | \194\189 45 | \194\188 46 | \194\161 47 | \194\171 48 | \194\187 49 | \226\150\145 50 | \226\150\146 51 | \226\150\147 52 | \226\148\130 53 | \226\148\164 54 | \195\129 55 | \195\130 56 | \195\128 57 | \194\169 58 | \226\149\163 59 | \226\149\145 60 | \226\149\151 61 | \226\149\157 62 | \194\162 63 | \194\165 64 | \226\148\144 65 | \226\148\148 66 | \226\148\180 67 | \226\148\172 68 | \226\148\156 69 | \226\148\128 70 | \226\148\188 71 | \195\163 72 | \195\131 73 | \226\149\154 74 | \226\149\148 75 | \226\149\169 76 | \226\149\166 77 | \226\149\160 78 | \226\149\144 79 | \226\149\172 80 | \194\164 81 | \195\176 82 | \195\144 83 | \195\138 84 | \195\139 85 | \195\136 86 | \196\177 87 | \195\141 88 | \195\142 89 | \195\143 90 | \226\148\152 91 | \226\148\140 92 | \226\150\136 93 | \226\150\132 94 | \194\166 95 | \195\140 96 | \226\150\128 97 | \195\147 98 | \195\159 99 | \195\148 100 | \195\146 101 | \195\181 102 | \195\149 103 | \194\181 104 | \195\190 105 | \195\158 106 | \195\154 107 | \195\155 108 | \195\153 109 | \195\189 110 | \195\157 111 | \194\175 112 | \194\180 113 | \194\173 114 | \194\177 115 | \226\128\151 116 | \194\190 117 | \194\182 118 | \194\167 119 | \195\183 120 | \194\184 121 | \194\176 122 | \194\168 123 | \194\183 124 | \194\185 125 | \194\179 126 | \194\178 127 | \226\150\160 128 | \194\160 129 | -------------------------------------------------------------------------------- /lovefs-noffi/codepages/852: -------------------------------------------------------------------------------- 1 | \195\135 2 | \195\188 3 | \195\169 4 | \195\162 5 | \195\164 6 | \197\175 7 | \196\135 8 | \195\167 9 | \197\130 10 | \195\171 11 | \197\144 12 | \197\145 13 | \195\174 14 | \197\185 15 | \195\132 16 | \196\134 17 | \195\137 18 | \196\185 19 | \196\186 20 | \195\180 21 | \195\182 22 | \196\189 23 | \196\190 24 | \197\154 25 | \197\155 26 | \195\150 27 | \195\156 28 | \197\164 29 | \197\165 30 | \197\129 31 | \195\151 32 | \196\141 33 | \195\161 34 | \195\173 35 | \195\179 36 | \195\186 37 | \196\132 38 | \196\133 39 | \197\189 40 | \197\190 41 | \196\152 42 | \196\153 43 | \194\172 44 | \197\186 45 | \196\140 46 | \197\159 47 | \194\171 48 | \194\187 49 | \226\150\145 50 | \226\150\146 51 | \226\150\147 52 | \226\148\130 53 | \226\148\164 54 | \195\129 55 | \195\130 56 | \196\154 57 | \197\158 58 | \226\149\163 59 | \226\149\145 60 | \226\149\151 61 | \226\149\157 62 | \197\187 63 | \197\188 64 | \226\148\144 65 | \226\148\148 66 | \226\148\180 67 | \226\148\172 68 | \226\148\156 69 | \226\148\128 70 | \226\148\188 71 | \196\130 72 | \196\131 73 | \226\149\154 74 | \226\149\148 75 | \226\149\169 76 | \226\149\166 77 | \226\149\160 78 | \226\149\144 79 | \226\149\172 80 | \194\164 81 | \196\145 82 | \196\144 83 | \196\142 84 | \195\139 85 | \196\143 86 | \197\135 87 | \195\141 88 | \195\142 89 | \196\155 90 | \226\148\152 91 | \226\148\140 92 | \226\150\136 93 | \226\150\132 94 | \197\162 95 | \197\174 96 | \226\150\128 97 | \195\147 98 | \195\159 99 | \195\148 100 | \197\131 101 | \197\132 102 | \197\136 103 | \197\160 104 | \197\161 105 | \197\148 106 | \195\154 107 | \197\149 108 | \197\176 109 | \195\189 110 | \195\157 111 | \197\163 112 | \194\180 113 | \194\173 114 | \203\157 115 | \203\155 116 | \203\135 117 | \203\152 118 | \194\167 119 | \195\183 120 | \194\184 121 | \194\176 122 | \194\168 123 | \203\153 124 | \197\177 125 | \197\152 126 | \197\153 127 | \226\150\160 128 | \194\160 129 | -------------------------------------------------------------------------------- /lovefs-noffi/codepages/855: -------------------------------------------------------------------------------- 1 | \209\146 2 | \208\130 3 | \209\147 4 | \208\131 5 | \209\145 6 | \208\129 7 | \209\148 8 | \208\132 9 | \209\149 10 | \208\133 11 | \209\150 12 | \208\134 13 | \209\151 14 | \208\135 15 | \209\152 16 | \208\136 17 | \209\153 18 | \208\137 19 | \209\154 20 | \208\138 21 | \209\155 22 | \208\139 23 | \209\156 24 | \208\140 25 | \209\158 26 | \208\142 27 | \209\159 28 | \208\143 29 | \209\142 30 | \208\174 31 | \209\138 32 | \208\170 33 | \208\176 34 | \208\144 35 | \208\177 36 | \208\145 37 | \209\134 38 | \208\166 39 | \208\180 40 | \208\148 41 | \208\181 42 | \208\149 43 | \209\132 44 | \208\164 45 | \208\179 46 | \208\147 47 | \194\171 48 | \194\187 49 | \226\150\145 50 | \226\150\146 51 | \226\150\147 52 | \226\148\130 53 | \226\148\164 54 | \209\133 55 | \208\165 56 | \208\184 57 | \208\152 58 | \226\149\163 59 | \226\149\145 60 | \226\149\151 61 | \226\149\157 62 | \208\185 63 | \208\153 64 | \226\148\144 65 | \226\148\148 66 | \226\148\180 67 | \226\148\172 68 | \226\148\156 69 | \226\148\128 70 | \226\148\188 71 | \208\186 72 | \208\154 73 | \226\149\154 74 | \226\149\148 75 | \226\149\169 76 | \226\149\166 77 | \226\149\160 78 | \226\149\144 79 | \226\149\172 80 | \194\164 81 | \208\187 82 | \208\155 83 | \208\188 84 | \208\156 85 | \208\189 86 | \208\157 87 | \208\190 88 | \208\158 89 | \208\191 90 | \226\148\152 91 | \226\148\140 92 | \226\150\136 93 | \226\150\132 94 | \208\159 95 | \209\143 96 | \226\150\128 97 | \208\175 98 | \209\128 99 | \208\160 100 | \209\129 101 | \208\161 102 | \209\130 103 | \208\162 104 | \209\131 105 | \208\163 106 | \208\182 107 | \208\150 108 | \208\178 109 | \208\146 110 | \209\140 111 | \208\172 112 | \226\132\150 113 | \194\173 114 | \209\139 115 | \208\171 116 | \208\183 117 | \208\151 118 | \209\136 119 | \208\168 120 | \209\141 121 | \208\173 122 | \209\137 123 | \208\169 124 | \209\135 125 | \208\167 126 | \194\167 127 | \226\150\160 128 | \194\160 129 | -------------------------------------------------------------------------------- /lovefs-noffi/codepages/866: -------------------------------------------------------------------------------- 1 | \208\144 2 | \208\145 3 | \208\146 4 | \208\147 5 | \208\148 6 | \208\149 7 | \208\150 8 | \208\151 9 | \208\152 10 | \208\153 11 | \208\154 12 | \208\155 13 | \208\156 14 | \208\157 15 | \208\158 16 | \208\159 17 | \208\160 18 | \208\161 19 | \208\162 20 | \208\163 21 | \208\164 22 | \208\165 23 | \208\166 24 | \208\167 25 | \208\168 26 | \208\169 27 | \208\170 28 | \208\171 29 | \208\172 30 | \208\173 31 | \208\174 32 | \208\175 33 | \208\176 34 | \208\177 35 | \208\178 36 | \208\179 37 | \208\180 38 | \208\181 39 | \208\182 40 | \208\183 41 | \208\184 42 | \208\185 43 | \208\186 44 | \208\187 45 | \208\188 46 | \208\189 47 | \208\190 48 | \208\191 49 | \226\150\145 50 | \226\150\146 51 | \226\150\147 52 | \226\148\130 53 | \226\148\164 54 | \226\149\161 55 | \226\149\162 56 | \226\149\150 57 | \226\149\149 58 | \226\149\163 59 | \226\149\145 60 | \226\149\151 61 | \226\149\157 62 | \226\149\156 63 | \226\149\155 64 | \226\148\144 65 | \226\148\148 66 | \226\148\180 67 | \226\148\172 68 | \226\148\156 69 | \226\148\128 70 | \226\148\188 71 | \226\149\158 72 | \226\149\159 73 | \226\149\154 74 | \226\149\148 75 | \226\149\169 76 | \226\149\166 77 | \226\149\160 78 | \226\149\144 79 | \226\149\172 80 | \226\149\167 81 | \226\149\168 82 | \226\149\164 83 | \226\149\165 84 | \226\149\153 85 | \226\149\152 86 | \226\149\146 87 | \226\149\147 88 | \226\149\171 89 | \226\149\170 90 | \226\148\152 91 | \226\148\140 92 | \226\150\136 93 | \226\150\132 94 | \226\150\140 95 | \226\150\144 96 | \226\150\128 97 | \209\128 98 | \209\129 99 | \209\130 100 | \209\131 101 | \209\132 102 | \209\133 103 | \209\134 104 | \209\135 105 | \209\136 106 | \209\137 107 | \209\138 108 | \209\139 109 | \209\140 110 | \209\141 111 | \209\142 112 | \209\143 113 | \208\129 114 | \209\145 115 | \208\132 116 | \209\148 117 | \208\135 118 | \209\151 119 | \208\142 120 | \209\158 121 | \194\176 122 | \226\136\153 123 | \194\183 124 | \226\136\154 125 | \226\132\150 126 | \194\164 127 | \226\150\160 128 | \194\160 129 | -------------------------------------------------------------------------------- /lovefs-noffi/codepages/8859-1: -------------------------------------------------------------------------------- 1 | \194\128 2 | \194\129 3 | \194\130 4 | \194\131 5 | \194\132 6 | \194\133 7 | \194\134 8 | \194\135 9 | \194\136 10 | \194\137 11 | \194\138 12 | \194\139 13 | \194\140 14 | \194\141 15 | \194\142 16 | \194\143 17 | \194\144 18 | \194\145 19 | \194\146 20 | \194\147 21 | \194\148 22 | \194\149 23 | \194\150 24 | \194\151 25 | \194\152 26 | \194\153 27 | \194\154 28 | \194\155 29 | \194\156 30 | \194\157 31 | \194\158 32 | \194\159 33 | \194\160 34 | \194\161 35 | \194\162 36 | \194\163 37 | \194\164 38 | \194\165 39 | \194\166 40 | \194\167 41 | \194\168 42 | \194\169 43 | \194\170 44 | \194\171 45 | \194\172 46 | \194\173 47 | \194\174 48 | \194\175 49 | \194\176 50 | \194\177 51 | \194\178 52 | \194\179 53 | \194\180 54 | \194\181 55 | \194\182 56 | \194\183 57 | \194\184 58 | \194\185 59 | \194\186 60 | \194\187 61 | \194\188 62 | \194\189 63 | \194\190 64 | \194\191 65 | \195\128 66 | \195\129 67 | \195\130 68 | \195\131 69 | \195\132 70 | \195\133 71 | \195\134 72 | \195\135 73 | \195\136 74 | \195\137 75 | \195\138 76 | \195\139 77 | \195\140 78 | \195\141 79 | \195\142 80 | \195\143 81 | \195\144 82 | \195\145 83 | \195\146 84 | \195\147 85 | \195\148 86 | \195\149 87 | \195\150 88 | \195\151 89 | \195\152 90 | \195\153 91 | \195\154 92 | \195\155 93 | \195\156 94 | \195\157 95 | \195\158 96 | \195\159 97 | \195\160 98 | \195\161 99 | \195\162 100 | \195\163 101 | \195\164 102 | \195\165 103 | \195\166 104 | \195\167 105 | \195\168 106 | \195\169 107 | \195\170 108 | \195\171 109 | \195\172 110 | \195\173 111 | \195\174 112 | \195\175 113 | \195\176 114 | \195\177 115 | \195\178 116 | \195\179 117 | \195\180 118 | \195\181 119 | \195\182 120 | \195\183 121 | \195\184 122 | \195\185 123 | \195\186 124 | \195\187 125 | \195\188 126 | \195\189 127 | \195\190 128 | \195\191 129 | -------------------------------------------------------------------------------- /lovefs-noffi/codepages/8859-15: -------------------------------------------------------------------------------- 1 | \194\128 2 | \194\129 3 | \194\130 4 | \194\131 5 | \194\132 6 | \194\133 7 | \194\134 8 | \194\135 9 | \194\136 10 | \194\137 11 | \194\138 12 | \194\139 13 | \194\140 14 | \194\141 15 | \194\142 16 | \194\143 17 | \194\144 18 | \194\145 19 | \194\146 20 | \194\147 21 | \194\148 22 | \194\149 23 | \194\150 24 | \194\151 25 | \194\152 26 | \194\153 27 | \194\154 28 | \194\155 29 | \194\156 30 | \194\157 31 | \194\158 32 | \194\159 33 | \194\160 34 | \194\161 35 | \194\162 36 | \194\163 37 | \226\130\172 38 | \194\165 39 | \197\160 40 | \194\167 41 | \197\161 42 | \194\169 43 | \194\170 44 | \194\171 45 | \194\172 46 | \194\173 47 | \194\174 48 | \194\175 49 | \194\176 50 | \194\177 51 | \194\178 52 | \194\179 53 | \197\189 54 | \194\181 55 | \194\182 56 | \194\183 57 | \197\190 58 | \194\185 59 | \194\186 60 | \194\187 61 | \197\146 62 | \197\147 63 | \197\184 64 | \194\191 65 | \195\128 66 | \195\129 67 | \195\130 68 | \195\131 69 | \195\132 70 | \195\133 71 | \195\134 72 | \195\135 73 | \195\136 74 | \195\137 75 | \195\138 76 | \195\139 77 | \195\140 78 | \195\141 79 | \195\142 80 | \195\143 81 | \195\144 82 | \195\145 83 | \195\146 84 | \195\147 85 | \195\148 86 | \195\149 87 | \195\150 88 | \195\151 89 | \195\152 90 | \195\153 91 | \195\154 92 | \195\155 93 | \195\156 94 | \195\157 95 | \195\158 96 | \195\159 97 | \195\160 98 | \195\161 99 | \195\162 100 | \195\163 101 | \195\164 102 | \195\165 103 | \195\166 104 | \195\167 105 | \195\168 106 | \195\169 107 | \195\170 108 | \195\171 109 | \195\172 110 | \195\173 111 | \195\174 112 | \195\175 113 | \195\176 114 | \195\177 115 | \195\178 116 | \195\179 117 | \195\180 118 | \195\181 119 | \195\182 120 | \195\183 121 | \195\184 122 | \195\185 123 | \195\186 124 | \195\187 125 | \195\188 126 | \195\189 127 | \195\190 128 | \195\191 129 | -------------------------------------------------------------------------------- /lovefs-noffi/codepages/8859-16: -------------------------------------------------------------------------------- 1 | \194\128 2 | \194\129 3 | \194\130 4 | \194\131 5 | \194\132 6 | \194\133 7 | \194\134 8 | \194\135 9 | \194\136 10 | \194\137 11 | \194\138 12 | \194\139 13 | \194\140 14 | \194\141 15 | \194\142 16 | \194\143 17 | \194\144 18 | \194\145 19 | \194\146 20 | \194\147 21 | \194\148 22 | \194\149 23 | \194\150 24 | \194\151 25 | \194\152 26 | \194\153 27 | \194\154 28 | \194\155 29 | \194\156 30 | \194\157 31 | \194\158 32 | \194\159 33 | \194\160 34 | \196\132 35 | \196\133 36 | \197\129 37 | \226\130\172 38 | \226\128\158 39 | \197\160 40 | \194\167 41 | \197\161 42 | \194\169 43 | \200\152 44 | \194\171 45 | \197\185 46 | \194\173 47 | \197\186 48 | \197\187 49 | \194\176 50 | \194\177 51 | \196\140 52 | \197\130 53 | \197\189 54 | \226\128\157 55 | \194\182 56 | \194\183 57 | \197\190 58 | \196\141 59 | \200\153 60 | \194\187 61 | \197\146 62 | \197\147 63 | \197\184 64 | \197\188 65 | \195\128 66 | \195\129 67 | \195\130 68 | \196\130 69 | \195\132 70 | \196\134 71 | \195\134 72 | \195\135 73 | \195\136 74 | \195\137 75 | \195\138 76 | \195\139 77 | \195\140 78 | \195\141 79 | \195\142 80 | \195\143 81 | \196\144 82 | \197\131 83 | \195\146 84 | \195\147 85 | \195\148 86 | \197\144 87 | \195\150 88 | \197\154 89 | \197\176 90 | \195\153 91 | \195\154 92 | \195\155 93 | \195\156 94 | \196\152 95 | \200\154 96 | \195\159 97 | \195\160 98 | \195\161 99 | \195\162 100 | \196\131 101 | \195\164 102 | \196\135 103 | \195\166 104 | \195\167 105 | \195\168 106 | \195\169 107 | \195\170 108 | \195\171 109 | \195\172 110 | \195\173 111 | \195\174 112 | \195\175 113 | \196\145 114 | \197\132 115 | \195\178 116 | \195\179 117 | \195\180 118 | \197\145 119 | \195\182 120 | \197\155 121 | \197\177 122 | \195\185 123 | \195\186 124 | \195\187 125 | \195\188 126 | \196\153 127 | \200\155 128 | \195\191 129 | -------------------------------------------------------------------------------- /lovefs-noffi/codepages/8859-2: -------------------------------------------------------------------------------- 1 | \194\128 2 | \194\129 3 | \194\130 4 | \194\131 5 | \194\132 6 | \194\133 7 | \194\134 8 | \194\135 9 | \194\136 10 | \194\137 11 | \194\138 12 | \194\139 13 | \194\140 14 | \194\141 15 | \194\142 16 | \194\143 17 | \194\144 18 | \194\145 19 | \194\146 20 | \194\147 21 | \194\148 22 | \194\149 23 | \194\150 24 | \194\151 25 | \194\152 26 | \194\153 27 | \194\154 28 | \194\155 29 | \194\156 30 | \194\157 31 | \194\158 32 | \194\159 33 | \194\160 34 | \196\132 35 | \203\152 36 | \197\129 37 | \194\164 38 | \196\189 39 | \197\154 40 | \194\167 41 | \194\168 42 | \197\160 43 | \197\158 44 | \197\164 45 | \197\185 46 | \194\173 47 | \197\189 48 | \197\187 49 | \194\176 50 | \196\133 51 | \203\155 52 | \197\130 53 | \194\180 54 | \196\190 55 | \197\155 56 | \203\135 57 | \194\184 58 | \197\161 59 | \197\159 60 | \197\165 61 | \197\186 62 | \203\157 63 | \197\190 64 | \197\188 65 | \197\148 66 | \195\129 67 | \195\130 68 | \196\130 69 | \195\132 70 | \196\185 71 | \196\134 72 | \195\135 73 | \196\140 74 | \195\137 75 | \196\152 76 | \195\139 77 | \196\154 78 | \195\141 79 | \195\142 80 | \196\142 81 | \196\144 82 | \197\131 83 | \197\135 84 | \195\147 85 | \195\148 86 | \197\144 87 | \195\150 88 | \195\151 89 | \197\152 90 | \197\174 91 | \195\154 92 | \197\176 93 | \195\156 94 | \195\157 95 | \197\162 96 | \195\159 97 | \197\149 98 | \195\161 99 | \195\162 100 | \196\131 101 | \195\164 102 | \196\186 103 | \196\135 104 | \195\167 105 | \196\141 106 | \195\169 107 | \196\153 108 | \195\171 109 | \196\155 110 | \195\173 111 | \195\174 112 | \196\143 113 | \196\145 114 | \197\132 115 | \197\136 116 | \195\179 117 | \195\180 118 | \197\145 119 | \195\182 120 | \195\183 121 | \197\153 122 | \197\175 123 | \195\186 124 | \197\177 125 | \195\188 126 | \195\189 127 | \197\163 128 | \203\153 129 | -------------------------------------------------------------------------------- /lovefs-noffi/codepages/8859-4: -------------------------------------------------------------------------------- 1 | \194\128 2 | \194\129 3 | \194\130 4 | \194\131 5 | \194\132 6 | \194\133 7 | \194\134 8 | \194\135 9 | \194\136 10 | \194\137 11 | \194\138 12 | \194\139 13 | \194\140 14 | \194\141 15 | \194\142 16 | \194\143 17 | \194\144 18 | \194\145 19 | \194\146 20 | \194\147 21 | \194\148 22 | \194\149 23 | \194\150 24 | \194\151 25 | \194\152 26 | \194\153 27 | \194\154 28 | \194\155 29 | \194\156 30 | \194\157 31 | \194\158 32 | \194\159 33 | \194\160 34 | \196\132 35 | \196\184 36 | \197\150 37 | \194\164 38 | \196\168 39 | \196\187 40 | \194\167 41 | \194\168 42 | \197\160 43 | \196\146 44 | \196\162 45 | \197\166 46 | \194\173 47 | \197\189 48 | \194\175 49 | \194\176 50 | \196\133 51 | \203\155 52 | \197\151 53 | \194\180 54 | \196\169 55 | \196\188 56 | \203\135 57 | \194\184 58 | \197\161 59 | \196\147 60 | \196\163 61 | \197\167 62 | \197\138 63 | \197\190 64 | \197\139 65 | \196\128 66 | \195\129 67 | \195\130 68 | \195\131 69 | \195\132 70 | \195\133 71 | \195\134 72 | \196\174 73 | \196\140 74 | \195\137 75 | \196\152 76 | \195\139 77 | \196\150 78 | \195\141 79 | \195\142 80 | \196\170 81 | \196\144 82 | \197\133 83 | \197\140 84 | \196\182 85 | \195\148 86 | \195\149 87 | \195\150 88 | \195\151 89 | \195\152 90 | \197\178 91 | \195\154 92 | \195\155 93 | \195\156 94 | \197\168 95 | \197\170 96 | \195\159 97 | \196\129 98 | \195\161 99 | \195\162 100 | \195\163 101 | \195\164 102 | \195\165 103 | \195\166 104 | \196\175 105 | \196\141 106 | \195\169 107 | \196\153 108 | \195\171 109 | \196\151 110 | \195\173 111 | \195\174 112 | \196\171 113 | \196\145 114 | \197\134 115 | \197\141 116 | \196\183 117 | \195\180 118 | \195\181 119 | \195\182 120 | \195\183 121 | \195\184 122 | \197\179 123 | \195\186 124 | \195\187 125 | \195\188 126 | \197\169 127 | \197\171 128 | \203\153 129 | -------------------------------------------------------------------------------- /lovefs-noffi/codepages/8859-5: -------------------------------------------------------------------------------- 1 | \194\128 2 | \194\129 3 | \194\130 4 | \194\131 5 | \194\132 6 | \194\133 7 | \194\134 8 | \194\135 9 | \194\136 10 | \194\137 11 | \194\138 12 | \194\139 13 | \194\140 14 | \194\141 15 | \194\142 16 | \194\143 17 | \194\144 18 | \194\145 19 | \194\146 20 | \194\147 21 | \194\148 22 | \194\149 23 | \194\150 24 | \194\151 25 | \194\152 26 | \194\153 27 | \194\154 28 | \194\155 29 | \194\156 30 | \194\157 31 | \194\158 32 | \194\159 33 | \194\160 34 | \208\129 35 | \208\130 36 | \208\131 37 | \208\132 38 | \208\133 39 | \208\134 40 | \208\135 41 | \208\136 42 | \208\137 43 | \208\138 44 | \208\139 45 | \208\140 46 | \194\173 47 | \208\142 48 | \208\143 49 | \208\144 50 | \208\145 51 | \208\146 52 | \208\147 53 | \208\148 54 | \208\149 55 | \208\150 56 | \208\151 57 | \208\152 58 | \208\153 59 | \208\154 60 | \208\155 61 | \208\156 62 | \208\157 63 | \208\158 64 | \208\159 65 | \208\160 66 | \208\161 67 | \208\162 68 | \208\163 69 | \208\164 70 | \208\165 71 | \208\166 72 | \208\167 73 | \208\168 74 | \208\169 75 | \208\170 76 | \208\171 77 | \208\172 78 | \208\173 79 | \208\174 80 | \208\175 81 | \208\176 82 | \208\177 83 | \208\178 84 | \208\179 85 | \208\180 86 | \208\181 87 | \208\182 88 | \208\183 89 | \208\184 90 | \208\185 91 | \208\186 92 | \208\187 93 | \208\188 94 | \208\189 95 | \208\190 96 | \208\191 97 | \209\128 98 | \209\129 99 | \209\130 100 | \209\131 101 | \209\132 102 | \209\133 103 | \209\134 104 | \209\135 105 | \209\136 106 | \209\137 107 | \209\138 108 | \209\139 109 | \209\140 110 | \209\141 111 | \209\142 112 | \209\143 113 | \226\132\150 114 | \209\145 115 | \209\146 116 | \209\147 117 | \209\148 118 | \209\149 119 | \209\150 120 | \209\151 121 | \209\152 122 | \209\153 123 | \209\154 124 | \209\155 125 | \209\156 126 | \194\167 127 | \209\158 128 | \209\159 129 | -------------------------------------------------------------------------------- /lovefs-noffi/codepages/8859-7: -------------------------------------------------------------------------------- 1 | \194\128 2 | \194\129 3 | \194\130 4 | \194\131 5 | \194\132 6 | \194\133 7 | \194\134 8 | \194\135 9 | \194\136 10 | \194\137 11 | \194\138 12 | \194\139 13 | \194\140 14 | \194\141 15 | \194\142 16 | \194\143 17 | \194\144 18 | \194\145 19 | \194\146 20 | \194\147 21 | \194\148 22 | \194\149 23 | \194\150 24 | \194\151 25 | \194\152 26 | \194\153 27 | \194\154 28 | \194\155 29 | \194\156 30 | \194\157 31 | \194\158 32 | \194\159 33 | \194\160 34 | \226\128\152 35 | \226\128\153 36 | \194\163 37 | \226\130\172 38 | \226\130\175 39 | \194\166 40 | \194\167 41 | \194\168 42 | \194\169 43 | \205\186 44 | \194\171 45 | \194\172 46 | \194\173 47 | 48 | \226\128\149 49 | \194\176 50 | \194\177 51 | \194\178 52 | \194\179 53 | \206\132 54 | \206\133 55 | \206\134 56 | \194\183 57 | \206\136 58 | \206\137 59 | \206\138 60 | \194\187 61 | \206\140 62 | \194\189 63 | \206\142 64 | \206\143 65 | \206\144 66 | \206\145 67 | \206\146 68 | \206\147 69 | \206\148 70 | \206\149 71 | \206\150 72 | \206\151 73 | \206\152 74 | \206\153 75 | \206\154 76 | \206\155 77 | \206\156 78 | \206\157 79 | \206\158 80 | \206\159 81 | \206\160 82 | \206\161 83 | 84 | \206\163 85 | \206\164 86 | \206\165 87 | \206\166 88 | \206\167 89 | \206\168 90 | \206\169 91 | \206\170 92 | \206\171 93 | \206\172 94 | \206\173 95 | \206\174 96 | \206\175 97 | \206\176 98 | \206\177 99 | \206\178 100 | \206\179 101 | \206\180 102 | \206\181 103 | \206\182 104 | \206\183 105 | \206\184 106 | \206\185 107 | \206\186 108 | \206\187 109 | \206\188 110 | \206\189 111 | \206\190 112 | \206\191 113 | \207\128 114 | \207\129 115 | \207\130 116 | \207\131 117 | \207\132 118 | \207\133 119 | \207\134 120 | \207\135 121 | \207\136 122 | \207\137 123 | \207\138 124 | \207\139 125 | \207\140 126 | \207\141 127 | \207\142 128 | 129 | -------------------------------------------------------------------------------- /lovefs-noffi/codepages/KOI8-R: -------------------------------------------------------------------------------- 1 | \226\148\128 2 | \226\148\130 3 | \226\148\140 4 | \226\148\144 5 | \226\148\148 6 | \226\148\152 7 | \226\148\156 8 | \226\148\164 9 | \226\148\172 10 | \226\148\180 11 | \226\148\188 12 | \226\150\128 13 | \226\150\132 14 | \226\150\136 15 | \226\150\140 16 | \226\150\144 17 | \226\150\145 18 | \226\150\146 19 | \226\150\147 20 | \226\140\160 21 | \226\150\160 22 | \226\136\153 23 | \226\136\154 24 | \226\137\136 25 | \226\137\164 26 | \226\137\165 27 | \194\160 28 | \226\140\161 29 | \194\176 30 | \194\178 31 | \194\183 32 | \195\183 33 | \226\149\144 34 | \226\149\145 35 | \226\149\146 36 | \209\145 37 | \226\149\147 38 | \226\149\148 39 | \226\149\149 40 | \226\149\150 41 | \226\149\151 42 | \226\149\152 43 | \226\149\153 44 | \226\149\154 45 | \226\149\155 46 | \226\149\156 47 | \226\149\157 48 | \226\149\158 49 | \226\149\159 50 | \226\149\160 51 | \226\149\161 52 | \208\129 53 | \226\149\162 54 | \226\149\163 55 | \226\149\164 56 | \226\149\165 57 | \226\149\166 58 | \226\149\167 59 | \226\149\168 60 | \226\149\169 61 | \226\149\170 62 | \226\149\171 63 | \226\149\172 64 | \194\169 65 | \209\142 66 | \208\176 67 | \208\177 68 | \209\134 69 | \208\180 70 | \208\181 71 | \209\132 72 | \208\179 73 | \209\133 74 | \208\184 75 | \208\185 76 | \208\186 77 | \208\187 78 | \208\188 79 | \208\189 80 | \208\190 81 | \208\191 82 | \209\143 83 | \209\128 84 | \209\129 85 | \209\130 86 | \209\131 87 | \208\182 88 | \208\178 89 | \209\140 90 | \209\139 91 | \208\183 92 | \209\136 93 | \209\141 94 | \209\137 95 | \209\135 96 | \209\138 97 | \208\174 98 | \208\144 99 | \208\145 100 | \208\166 101 | \208\148 102 | \208\149 103 | \208\164 104 | \208\147 105 | \208\165 106 | \208\152 107 | \208\153 108 | \208\154 109 | \208\155 110 | \208\156 111 | \208\157 112 | \208\158 113 | \208\159 114 | \208\175 115 | \208\160 116 | \208\161 117 | \208\162 118 | \208\163 119 | \208\150 120 | \208\146 121 | \208\172 122 | \208\171 123 | \208\151 124 | \208\168 125 | \208\173 126 | \208\169 127 | \208\167 128 | \208\170 129 | -------------------------------------------------------------------------------- /lovefs-noffi/codepages/KOI8-U: -------------------------------------------------------------------------------- 1 | \226\148\128 2 | \226\148\130 3 | \226\148\140 4 | \226\148\144 5 | \226\148\148 6 | \226\148\152 7 | \226\148\156 8 | \226\148\164 9 | \226\148\172 10 | \226\148\180 11 | \226\148\188 12 | \226\150\128 13 | \226\150\132 14 | \226\150\136 15 | \226\150\140 16 | \226\150\144 17 | \226\150\145 18 | \226\150\146 19 | \226\150\147 20 | \226\140\160 21 | \226\150\160 22 | \226\136\153 23 | \226\136\154 24 | \226\137\136 25 | \226\137\164 26 | \226\137\165 27 | \194\160 28 | \226\140\161 29 | \194\176 30 | \194\178 31 | \194\183 32 | \195\183 33 | \226\149\144 34 | \226\149\145 35 | \226\149\146 36 | \209\145 37 | \209\148 38 | \226\149\148 39 | \209\150 40 | \209\151 41 | \226\149\151 42 | \226\149\152 43 | \226\149\153 44 | \226\149\154 45 | \226\149\155 46 | \210\145 47 | \226\149\157 48 | \226\149\158 49 | \226\149\159 50 | \226\149\160 51 | \226\149\161 52 | \208\129 53 | \208\132 54 | \226\149\163 55 | \208\134 56 | \208\135 57 | \226\149\166 58 | \226\149\167 59 | \226\149\168 60 | \226\149\169 61 | \226\149\170 62 | \210\144 63 | \226\149\172 64 | \194\169 65 | \209\142 66 | \208\176 67 | \208\177 68 | \209\134 69 | \208\180 70 | \208\181 71 | \209\132 72 | \208\179 73 | \209\133 74 | \208\184 75 | \208\185 76 | \208\186 77 | \208\187 78 | \208\188 79 | \208\189 80 | \208\190 81 | \208\191 82 | \209\143 83 | \209\128 84 | \209\129 85 | \209\130 86 | \209\131 87 | \208\182 88 | \208\178 89 | \209\140 90 | \209\139 91 | \208\183 92 | \209\136 93 | \209\141 94 | \209\137 95 | \209\135 96 | \209\138 97 | \208\174 98 | \208\144 99 | \208\145 100 | \208\166 101 | \208\148 102 | \208\149 103 | \208\164 104 | \208\147 105 | \208\165 106 | \208\152 107 | \208\153 108 | \208\154 109 | \208\155 110 | \208\156 111 | \208\157 112 | \208\158 113 | \208\159 114 | \208\175 115 | \208\160 116 | \208\161 117 | \208\162 118 | \208\163 119 | \208\150 120 | \208\146 121 | \208\172 122 | \208\171 123 | \208\151 124 | \208\168 125 | \208\173 126 | \208\169 127 | \208\167 128 | \208\170 129 | -------------------------------------------------------------------------------- /lovefs-noffi/codepages/code.txt: -------------------------------------------------------------------------------- 1 | ─ 0x80 0x2500 0xE2, 0x94, 0x80 Box Drawings Light Horizontal 2 | │ 0x81 0x2502 0xE2, 0x94, 0x82 Box Drawings Light Vertical 3 | ┌ 0x82 0x250C 0xE2, 0x94, 0x8C Box Drawings Light Down And Right 4 | ┐ 0x83 0x2510 0xE2, 0x94, 0x90 Box Drawings Light Down And Left 5 | └ 0x84 0x2514 0xE2, 0x94, 0x94 Box Drawings Light Up And Right 6 | ┘ 0x85 0x2518 0xE2, 0x94, 0x98 Box Drawings Light Up And Left 7 | ├ 0x86 0x251C 0xE2, 0x94, 0x9C Box Drawings Light Vertical And Right 8 | ┤ 0x87 0x2524 0xE2, 0x94, 0xA4 Box Drawings Light Vertical And Left 9 | ┬ 0x88 0x252C 0xE2, 0x94, 0xAC Box Drawings Light Down And Horizontal 10 | ┴ 0x89 0x2534 0xE2, 0x94, 0xB4 Box Drawings Light Up And Horizontal 11 | ┼ 0x8A 0x253C 0xE2, 0x94, 0xBC Box Drawings Light Vertical And Horizontal 12 | ▀ 0x8B 0x2580 0xE2, 0x96, 0x80 Upper Half Block 13 | ▄ 0x8C 0x2584 0xE2, 0x96, 0x84 Lower Half Block 14 | █ 0x8D 0x2588 0xE2, 0x96, 0x88 Full Block 15 | ▌ 0x8E 0x258C 0xE2, 0x96, 0x8C Left Half Block 16 | ▐ 0x8F 0x2590 0xE2, 0x96, 0x90 Right Half Block 17 | ░ 0x90 0x2591 0xE2, 0x96, 0x91 Light Shade 18 | ▒ 0x91 0x2592 0xE2, 0x96, 0x92 Medium Shade 19 | ▓ 0x92 0x2593 0xE2, 0x96, 0x93 Dark Shade 20 | ⌠ 0x93 0x2320 0xE2, 0x8C, 0xA0 Top Half Integral 21 | ■ 0x94 0x25A0 0xE2, 0x96, 0xA0 Black Square 22 | ∙ 0x95 0x2219 0xE2, 0x88, 0x99 Bullet Operator 23 | √ 0x96 0x221A 0xE2, 0x88, 0x9A Square Root 24 | ≈ 0x97 0x2248 0xE2, 0x89, 0x88 Almost Equal To 25 | ≤ 0x98 0x2264 0xE2, 0x89, 0xA4 Less-than Or Equal To 26 | ≥ 0x99 0x2265 0xE2, 0x89, 0xA5 Greater-than Or Equal To 27 | 0x9A 0x00A0 0xC2, 0xA0 No-break Space 28 | ⌡ 0x9B 0x2321 0xE2, 0x8C, 0xA1 Bottom Half Integral 29 | ° 0x9C 0x00B0 0xC2, 0xB0 Degree Sign 30 | ² 0x9D 0x00B2 0xC2, 0xB2 Superscript Two 31 | · 0x9E 0x00B7 0xC2, 0xB7 Middle Dot 32 | ÷ 0x9F 0x00F7 0xC3, 0xB7 Division Sign 33 | ═ 0xA0 0x2550 0xE2, 0x95, 0x90 Box Drawings Double Horizontal 34 | ║ 0xA1 0x2551 0xE2, 0x95, 0x91 Box Drawings Double Vertical 35 | ╒ 0xA2 0x2552 0xE2, 0x95, 0x92 Box Drawings Down Single And Right Double 36 | ё 0xA3 0x0451 0xD1, 0x91 Cyrillic Small Letter Io 37 | є 0xA4 0x0454 0xD1, 0x94 Cyrillic Small Letter Ukrainian Ie 38 | ╔ 0xA5 0x2554 0xE2, 0x95, 0x94 Box Drawings Double Down And Right 39 | і 0xA6 0x0456 0xD1, 0x96 Cyrillic Small Letter Byelorussian-ukrainian I 40 | ї 0xA7 0x0457 0xD1, 0x97 Cyrillic Small Letter Yi (ukrainian) 41 | ╗ 0xA8 0x2557 0xE2, 0x95, 0x97 Box Drawings Double Down And Left 42 | ╘ 0xA9 0x2558 0xE2, 0x95, 0x98 Box Drawings Up Single And Right Double 43 | ╙ 0xAA 0x2559 0xE2, 0x95, 0x99 Box Drawings Up Double And Right Single 44 | ╚ 0xAB 0x255A 0xE2, 0x95, 0x9A Box Drawings Double Up And Right 45 | ╛ 0xAC 0x255B 0xE2, 0x95, 0x9B Box Drawings Up Single And Left Double 46 | ґ 0xAD 0x0491 0xD2, 0x91 Cyrillic Small Letter Ghe With Upturn 47 | ╝ 0xAE 0x255D 0xE2, 0x95, 0x9D Box Drawings Double Up And Left 48 | ╞ 0xAF 0x255E 0xE2, 0x95, 0x9E Box Drawings Vertical Single And Right Double 49 | ╟ 0xB0 0x255F 0xE2, 0x95, 0x9F Box Drawings Vertical Double And Right Single 50 | ╠ 0xB1 0x2560 0xE2, 0x95, 0xA0 Box Drawings Double Vertical And Right 51 | ╡ 0xB2 0x2561 0xE2, 0x95, 0xA1 Box Drawings Vertical Single And Left Double 52 | Ё 0xB3 0x0401 0xD0, 0x81 Cyrillic Capital Letter Io 53 | Є 0xB4 0x0404 0xD0, 0x84 Cyrillic Capital Letter Ukrainian Ie 54 | ╣ 0xB5 0x2563 0xE2, 0x95, 0xA3 Box Drawings Double Vertical And Left 55 | І 0xB6 0x0406 0xD0, 0x86 Cyrillic Capital Letter Byelorussian-ukrainian I 56 | Ї 0xB7 0x0407 0xD0, 0x87 Cyrillic Capital Letter Yi (ukrainian) 57 | ╦ 0xB8 0x2566 0xE2, 0x95, 0xA6 Box Drawings Double Down And Horizontal 58 | ╧ 0xB9 0x2567 0xE2, 0x95, 0xA7 Box Drawings Up Single And Horizontal Double 59 | ╨ 0xBA 0x2568 0xE2, 0x95, 0xA8 Box Drawings Up Double And Horizontal Single 60 | ╩ 0xBB 0x2569 0xE2, 0x95, 0xA9 Box Drawings Double Up And Horizontal 61 | ╪ 0xBC 0x256A 0xE2, 0x95, 0xAA Box Drawings Vertical Single And Horizontal Double 62 | Ґ 0xBD 0x0490 0xD2, 0x90 Cyrillic Capital Letter Ghe With Upturn 63 | ╬ 0xBE 0x256C 0xE2, 0x95, 0xAC Box Drawings Double Vertical And Horizontal 64 | © 0xBF 0x00A9 0xC2, 0xA9 Copyright Sign 65 | ю 0xC0 0x044E 0xD1, 0x8E Cyrillic Small Letter Yu 66 | а 0xC1 0x0430 0xD0, 0xB0 Cyrillic Small Letter A 67 | б 0xC2 0x0431 0xD0, 0xB1 Cyrillic Small Letter Be 68 | ц 0xC3 0x0446 0xD1, 0x86 Cyrillic Small Letter Tse 69 | д 0xC4 0x0434 0xD0, 0xB4 Cyrillic Small Letter De 70 | е 0xC5 0x0435 0xD0, 0xB5 Cyrillic Small Letter Ie 71 | ф 0xC6 0x0444 0xD1, 0x84 Cyrillic Small Letter Ef 72 | г 0xC7 0x0433 0xD0, 0xB3 Cyrillic Small Letter Ghe 73 | х 0xC8 0x0445 0xD1, 0x85 Cyrillic Small Letter Ha 74 | и 0xC9 0x0438 0xD0, 0xB8 Cyrillic Small Letter I 75 | й 0xCA 0x0439 0xD0, 0xB9 Cyrillic Small Letter Short I 76 | к 0xCB 0x043A 0xD0, 0xBA Cyrillic Small Letter Ka 77 | л 0xCC 0x043B 0xD0, 0xBB Cyrillic Small Letter El 78 | м 0xCD 0x043C 0xD0, 0xBC Cyrillic Small Letter Em 79 | н 0xCE 0x043D 0xD0, 0xBD Cyrillic Small Letter En 80 | о 0xCF 0x043E 0xD0, 0xBE Cyrillic Small Letter O 81 | п 0xD0 0x043F 0xD0, 0xBF Cyrillic Small Letter Pe 82 | я 0xD1 0x044F 0xD1, 0x8F Cyrillic Small Letter Ya 83 | р 0xD2 0x0440 0xD1, 0x80 Cyrillic Small Letter Er 84 | с 0xD3 0x0441 0xD1, 0x81 Cyrillic Small Letter Es 85 | т 0xD4 0x0442 0xD1, 0x82 Cyrillic Small Letter Te 86 | у 0xD5 0x0443 0xD1, 0x83 Cyrillic Small Letter U 87 | ж 0xD6 0x0436 0xD0, 0xB6 Cyrillic Small Letter Zhe 88 | в 0xD7 0x0432 0xD0, 0xB2 Cyrillic Small Letter Ve 89 | ь 0xD8 0x044C 0xD1, 0x8C Cyrillic Small Letter Soft Sign 90 | ы 0xD9 0x044B 0xD1, 0x8B Cyrillic Small Letter Yeru 91 | з 0xDA 0x0437 0xD0, 0xB7 Cyrillic Small Letter Ze 92 | ш 0xDB 0x0448 0xD1, 0x88 Cyrillic Small Letter Sha 93 | э 0xDC 0x044D 0xD1, 0x8D Cyrillic Small Letter E 94 | щ 0xDD 0x0449 0xD1, 0x89 Cyrillic Small Letter Shcha 95 | ч 0xDE 0x0447 0xD1, 0x87 Cyrillic Small Letter Che 96 | ъ 0xDF 0x044A 0xD1, 0x8A Cyrillic Small Letter Hard Sign 97 | Ю 0xE0 0x042E 0xD0, 0xAE Cyrillic Capital Letter Yu 98 | А 0xE1 0x0410 0xD0, 0x90 Cyrillic Capital Letter A 99 | Б 0xE2 0x0411 0xD0, 0x91 Cyrillic Capital Letter Be 100 | Ц 0xE3 0x0426 0xD0, 0xA6 Cyrillic Capital Letter Tse 101 | Д 0xE4 0x0414 0xD0, 0x94 Cyrillic Capital Letter De 102 | Е 0xE5 0x0415 0xD0, 0x95 Cyrillic Capital Letter Ie 103 | Ф 0xE6 0x0424 0xD0, 0xA4 Cyrillic Capital Letter Ef 104 | Г 0xE7 0x0413 0xD0, 0x93 Cyrillic Capital Letter Ghe 105 | Х 0xE8 0x0425 0xD0, 0xA5 Cyrillic Capital Letter Ha 106 | И 0xE9 0x0418 0xD0, 0x98 Cyrillic Capital Letter I 107 | Й 0xEA 0x0419 0xD0, 0x99 Cyrillic Capital Letter Short I 108 | К 0xEB 0x041A 0xD0, 0x9A Cyrillic Capital Letter Ka 109 | Л 0xEC 0x041B 0xD0, 0x9B Cyrillic Capital Letter El 110 | М 0xED 0x041C 0xD0, 0x9C Cyrillic Capital Letter Em 111 | Н 0xEE 0x041D 0xD0, 0x9D Cyrillic Capital Letter En 112 | О 0xEF 0x041E 0xD0, 0x9E Cyrillic Capital Letter O 113 | П 0xF0 0x041F 0xD0, 0x9F Cyrillic Capital Letter Pe 114 | Я 0xF1 0x042F 0xD0, 0xAF Cyrillic Capital Letter Ya 115 | Р 0xF2 0x0420 0xD0, 0xA0 Cyrillic Capital Letter Er 116 | С 0xF3 0x0421 0xD0, 0xA1 Cyrillic Capital Letter Es 117 | Т 0xF4 0x0422 0xD0, 0xA2 Cyrillic Capital Letter Te 118 | У 0xF5 0x0423 0xD0, 0xA3 Cyrillic Capital Letter U 119 | Ж 0xF6 0x0416 0xD0, 0x96 Cyrillic Capital Letter Zhe 120 | В 0xF7 0x0412 0xD0, 0x92 Cyrillic Capital Letter Ve 121 | Ь 0xF8 0x042C 0xD0, 0xAC Cyrillic Capital Letter Soft Sign 122 | Ы 0xF9 0x042B 0xD0, 0xAB Cyrillic Capital Letter Yeru 123 | З 0xFA 0x0417 0xD0, 0x97 Cyrillic Capital Letter Ze 124 | Ш 0xFB 0x0428 0xD0, 0xA8 Cyrillic Capital Letter Sha 125 | Э 0xFC 0x042D 0xD0, 0xAD Cyrillic Capital Letter E 126 | Щ 0xFD 0x0429 0xD0, 0xA9 Cyrillic Capital Letter Shcha 127 | Ч 0xFE 0x0427 0xD0, 0xA7 Cyrillic Capital Letter Che 128 | Ъ 0xFF 0x042A 0xD0, 0xAA Cyrillic Capital Letter Hard Sign 129 | -------------------------------------------------------------------------------- /lovefs-noffi/codepages/main.lua: -------------------------------------------------------------------------------- 1 | --f = io.open('KOI8-U.txt') 2 | for line in io.lines('code.txt') do 3 | for word in line:gmatch("0x%x+") do io.write('\\'..tonumber(word)..' ') end 4 | print() 5 | end 6 | -------------------------------------------------------------------------------- /lovefs-noffi/conf.lua: -------------------------------------------------------------------------------- 1 | function love.conf(t) 2 | t.title = "LoveFS" -- The title of the window the game is in (string) 3 | t.author = "linux-man" -- The author of the game (string) 4 | t.url = nil -- The website of the game (string) 5 | t.identity = nil -- The name of the save directory (string) 6 | t.version = "0.10.2" -- The LÖVE version this game was made for (string) 7 | t.console = false -- Attach a console (boolean, Windows only) 8 | t.window.width = 800 -- The window width (number) 9 | t.window.height = 600 -- The window height (number) 10 | t.window.fullscreen = false -- Enable fullscreen (boolean) 11 | t.window.vsync = true -- Enable vertical sync (boolean) 12 | t.window.fsaa = 0 -- The number of FSAA-buffers (number) 13 | t.modules.joystick = false -- Enable the joystick module (boolean) 14 | t.modules.audio = true -- Enable the audio module (boolean) 15 | t.modules.keyboard = true -- Enable the keyboard module (boolean) 16 | t.modules.event = true -- Enable the event module (boolean) 17 | t.modules.image = true -- Enable the image module (boolean) 18 | t.modules.graphics = true -- Enable the graphics module (boolean) 19 | t.modules.timer = true -- Enable the timer module (boolean) 20 | t.modules.mouse = true -- Enable the mouse module (boolean) 21 | t.modules.sound = true -- Enable the sound module (boolean) 22 | t.modules.physics = false -- Enable the physics module (boolean) 23 | end 24 | -------------------------------------------------------------------------------- /lovefs-noffi/dialogs.lua: -------------------------------------------------------------------------------- 1 | --[[------------------------------------ 2 | LoveFS Dialogs v0.8 3 | Pure Lua FileSystem Access - Loveframes interface 4 | Under the MIT license. 5 | copyright(c) 2012 Caldas Lopes aka linux-man 6 | --]]------------------------------------ 7 | 8 | require 'loveframes' 9 | 10 | local lovefs_dir = 'lovefs' 11 | 12 | local function normalize(str) 13 | local str2 = '' 14 | for n = 1, #str do 15 | if str:byte(n) < 128 then str2 = str2..str:sub(n, n) end 16 | end 17 | return str2 18 | end 19 | 20 | dialog = {} 21 | dialog.__index = dialog 22 | 23 | function dialog:refresh() 24 | self.current:SetText(self.window_fs.current) 25 | self.list:Clear() 26 | local i = loveframes.Create('button') 27 | i:SetSize(405, 25) 28 | i.image = up 29 | i:SetText('..') 30 | i.groupIndex = 1 31 | i.OnClick = function(object) 32 | self.window.selectedFile = '' 33 | self.window_fs:cd(object:GetText()) 34 | self:refresh() 35 | end 36 | self.list:AddItem(i) 37 | for _, d in ipairs(self.window_fs.dirs) do 38 | local i = loveframes.Create('button') 39 | i:SetSize(405, 25) 40 | i.image = folder 41 | i:SetText(d) 42 | i.groupIndex = 1 43 | i.OnClick = function(object) 44 | self.window.selectedFile = '' 45 | if self.fileinput then self.fileinput.text ='' end 46 | self.window_fs:cd(object:GetText()) 47 | self:refresh() 48 | end 49 | self.list:AddItem(i) 50 | end 51 | for _, f in ipairs(self.window_fs.files) do 52 | local i = loveframes.Create('button') 53 | i:SetSize(405, 25) 54 | i.image = file 55 | i:SetText(f) 56 | i.groupIndex = 1 57 | i.OnClick = function(object) 58 | if self.window_fs:isFile(object:GetText()) then 59 | self.window.selectedFile = object:GetText() 60 | if self.fileinput then self.fileinput.text = normalize(self.window.selectedFile) end 61 | end 62 | end 63 | self.list:AddItem(i) 64 | end 65 | end 66 | 67 | function dialog:default() 68 | folder = love.graphics.newImage(lovefs_dir..'/folder.png') 69 | file = love.graphics.newImage(lovefs_dir..'/file.png') 70 | up = love.graphics.newImage(lovefs_dir..'/up.png') 71 | 72 | self.window = loveframes.Create('frame') 73 | self.window:SetSize(415, 395) 74 | self.window:Center() 75 | self.window.selectedFile = '' 76 | --self.window:SetModal(true) --multichoice and tooltip don't play well with SetModal 77 | 78 | local drives = loveframes.Create('multichoice', self.window) 79 | local tooltip = loveframes.Create('tooltip') 80 | tooltip:SetObject(drives) 81 | tooltip:SetPadding(5) 82 | tooltip:SetOffsets(5, -5) 83 | tooltip:SetText('Drives') 84 | drives:SetPos(5, 25+5) 85 | drives:SetSize(100, 25) 86 | drives:SetListHeight(100) 87 | drives:SetPadding(0) 88 | drives:SetSpacing(0) 89 | drives.OnChoiceSelected = function(object, choice) 90 | self.window.selectedFile = '' 91 | self.window_fs:cd(choice) 92 | self:refresh() 93 | end 94 | local _, drive 95 | for _, drive in ipairs(self.window_fs.drives) do 96 | drives:AddChoice(drive) 97 | end 98 | drives:SetChoice(self.window_fs.drives[1]) 99 | 100 | self.current = loveframes.Create('button', self.window) 101 | local tooltip = loveframes.Create('tooltip') 102 | tooltip:SetObject(self.current) 103 | tooltip:SetPadding(5) 104 | tooltip:SetOffsets(5, -5) 105 | tooltip:SetText('Current Directory') 106 | self.current:SetPos(100+10, 25+5) 107 | self.current:SetSize(300, 25) 108 | self.current.image = folder 109 | self.current.checked = true 110 | self.current.enabled = false 111 | 112 | self.list = loveframes.Create('list', self.window) 113 | self.list:SetPos(5, 60) 114 | self.list:SetSize(405, 300) 115 | self.list:SetDisplayType('vertical') 116 | self.list:SetPadding(0) 117 | self.list:SetSpacing(0) 118 | 119 | local cancel = loveframes.Create('button', self.window) 120 | cancel:SetPos(410-75-80, 360+5) 121 | cancel:SetSize(75, 25) 122 | cancel:SetText('Cancel') 123 | cancel.OnClick = function(object) 124 | self.window:Remove() 125 | self = nil 126 | end 127 | local ok = loveframes.Create('button', self.window) 128 | ok:SetPos(410-75, 360+5) 129 | ok:SetSize(75, 25) 130 | ok:SetText('OK') 131 | ok.OnClick = function(object) 132 | if self.window.selectedFile ~= '' then 133 | if self.window_fs.os == 'Windows' then self.window_fs.selectedFile = self.window_fs.current..'\\'..self.window.selectedFile 134 | else self.window_fs.selectedFile = self.window_fs.current..'/'..self.window.selectedFile end 135 | self.window:Remove() 136 | self = nil 137 | end 138 | end 139 | end 140 | 141 | function loadDialog(window_fs, filters) 142 | local temp = {} 143 | setmetatable(temp, dialog) 144 | temp.window_fs = window_fs 145 | temp:default() 146 | local tb_filters = {} 147 | local _, v 148 | if filters then for _,v in ipairs(filters) do table.insert(tb_filters, v) end end 149 | temp.window:SetName('Load File') 150 | 151 | local filter = loveframes.Create('multichoice', temp.window) 152 | local tooltip = loveframes.Create('tooltip') 153 | tooltip:SetObject(filter) 154 | tooltip:SetPadding(5) 155 | tooltip:SetOffsets(5, -5) 156 | tooltip:SetText('Filter') 157 | filter:SetPos(5, 360+5) 158 | filter:SetSize(245, 25) 159 | filter:SetListHeight(100) 160 | filter:SetPadding(0) 161 | filter:SetSpacing(0) 162 | filter.OnChoiceSelected = function(object, choice) 163 | if choice:find('|') then window_fs:setParam(choice:sub(choice:find('|') + 1)) 164 | else window_fs:setParam(choice) end 165 | temp:refresh() 166 | end 167 | local _, f 168 | for _, f in ipairs(tb_filters) do 169 | filter:AddChoice(f) 170 | end 171 | filter:SetChoice(tb_filters[1]) 172 | if tb_filters[1]:find('|') then window_fs:setParam(tb_filters[1]:sub(tb_filters[1]:find('|') + 1)) 173 | else window_fs:setParam(tb_filters[1]) end 174 | temp:refresh() 175 | return temp 176 | end 177 | 178 | function saveDialog(window_fs) 179 | local temp = {} 180 | setmetatable(temp, dialog) 181 | temp.window_fs = window_fs 182 | temp:default() 183 | temp.window:SetName('Save File') 184 | 185 | temp.fileinput = loveframes.Create('textinput', temp.window) 186 | local tooltip = loveframes.Create('tooltip') 187 | tooltip:SetObject(temp.fileinput) 188 | tooltip:SetPadding(5) 189 | tooltip:SetOffsets(5, -5) 190 | tooltip:SetText('Filename') 191 | temp.fileinput:SetPos(5, 360+5) 192 | temp.fileinput:SetSize(245, 25) 193 | temp.fileinput.OnTextChanged = function(object, text) 194 | temp.window.selectedFile = object:GetText() 195 | end 196 | temp:refresh() 197 | return temp 198 | end 199 | -------------------------------------------------------------------------------- /lovefs-noffi/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-man/lovefs/e2aa001a657990b9c23807e917e6b9d869ac5a2e/lovefs-noffi/file.png -------------------------------------------------------------------------------- /lovefs-noffi/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linux-man/lovefs/e2aa001a657990b9c23807e917e6b9d869ac5a2e/lovefs-noffi/folder.png -------------------------------------------------------------------------------- /lovefs-noffi/lovefs.lua: -------------------------------------------------------------------------------- 1 | --[[------------------------------------ 2 | LoveFS v0.9 3 | Pure Lua FileSystem Access 4 | Under the MIT license. 5 | copyright(c) 2016 Caldas Lopes aka linux-man 6 | --]]------------------------------------ 7 | 8 | local lovefs_dir = 'lovefs' 9 | local cp_table = {'737', '775', '850', '852', '855', '866', '8859-1', '8859-2', '8859-4', '8859-5', '8859-7', '8859-15', '8859-16', 'KOI8-R', 'KOI8-U'} 10 | 11 | local function strformat(str) 12 | str = str:gsub('"', '') 13 | str = string.format('%q',str) 14 | while str:find('\\\\') do str = str:gsub('\\\\', '\\') end 15 | while str:find('//') do str = str:gsub('//', '/') end 16 | return str 17 | end 18 | 19 | local function split(str, sep) 20 | local sep, fields = sep or ":", {} 21 | local pattern = string.format("([^%s]+)", sep) 22 | str:gsub(pattern, function(c) fields[#fields+1] = c end) 23 | return fields 24 | end 25 | 26 | local function split_lines(str) 27 | local t = {} 28 | for line in str:gmatch("[^\r\n]+") do table.insert(t, line) end 29 | return t 30 | end 31 | 32 | local function join_tables(t1, t2) 33 | local tb = {} 34 | for _,v in ipairs(t1) do table.insert(tb, v) end 35 | for _,v in ipairs(t2) do table.insert(tb, v) end 36 | return tb 37 | end 38 | 39 | local function normalize_utf8(str, always) 40 | always = always or false 41 | local str2 = str 42 | local utfcodes = '194,195,196,197,198,200,203,206,207,208,209,210,226' 43 | if always or not pcall(function() love.graphics.print(str, 0, 0) end) then 44 | str2 = '' 45 | for n = 1, #str do 46 | if str:byte(n) < 128 then 47 | str2 = str2..str:sub(n, n) 48 | else 49 | if utfcodes:find(tostring(str:byte(n))) then str2 = str2..'?' end 50 | end 51 | end 52 | end 53 | return str2 54 | end 55 | 56 | local function normalize_cp(str) 57 | local str2 = '' 58 | for n = 1, #str do 59 | if str:byte(n) < 128 then str2 = str2..str:sub(n, n) 60 | else str2 = str2..'?' end 61 | end 62 | return str2 63 | end 64 | 65 | filesystem = {} 66 | filesystem.__index = filesystem 67 | 68 | function filesystem:loadCp(codepage) 69 | self.tb_utf8, self.tb_cp = nil, nil 70 | if not codepage then 71 | if self.os == 'Windows' then 72 | _, lang = self:run('chcp') 73 | lang = lang:gsub('\n', '') 74 | else 75 | _, lang = self:run('echo $LANG') 76 | lang = lang:gsub('\n', '') 77 | end 78 | codepage = lang 79 | for _, c in ipairs(cp_table) do 80 | if lang:find(c) then codepage = c end 81 | end 82 | end 83 | self.cp = codepage 84 | if not love.filesystem.isFile(lovefs_dir..'/codepages/'..codepage) then 85 | if self.current then self:cd(self.current) end 86 | return false 87 | end 88 | local count = 128 89 | self.tb_utf8, self.tb_cp = {}, {} 90 | for line in love.filesystem.lines(lovefs_dir..'/codepages/'..codepage) do 91 | if line ~= '' then 92 | self.tb_utf8[count] = split(line, '\\') 93 | self.tb_cp[line] = count 94 | end 95 | count = count + 1 96 | end 97 | if self.current then self:cd(self.current) end 98 | return true 99 | end 100 | 101 | function filesystem:toUtf8(str) 102 | if not self.tb_utf8 then return normalize_utf8(str) end 103 | local str2 = '' 104 | for n = 1, #str do 105 | if str:byte(n) < 128 then str2 = str2..str:sub(n, n) 106 | else 107 | if self.tb_utf8[str:byte(n)] then 108 | for _, n in ipairs(self.tb_utf8[str:byte(n)]) do 109 | str2 = str2..string.char(n) 110 | end 111 | else str2 = str2..str:sub(n, n) 112 | end 113 | end 114 | end 115 | return normalize_utf8(str2) 116 | end 117 | 118 | function filesystem:path8p3(dir, all) 119 | dir = dir or self.current 120 | if not (dir:sub(2,2) == ':') then dir = strformat(self.current..'\\'..dir):sub(2, -2) end 121 | dir = dir:gsub('/', '\\') 122 | local tb_dir = split(dir, '\\') 123 | local dir8p3 = tb_dir[1] 124 | table.remove(tb_dir, 1) 125 | while #tb_dir > 1 do 126 | local r, c = self:run('dir /X /AD '..strformat(dir8p3..'\\')) 127 | if not r then return self.current end 128 | local dir_result = split_lines(c) 129 | local name8p3 = '' 130 | for _, line in ipairs(dir_result) do 131 | if line:find('