Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/britzl/defold-lfs
LuaFileSystem port to a Defold native extension
https://github.com/britzl/defold-lfs
defold defold-library luafilesystem
Last synced: about 2 months ago
JSON representation
LuaFileSystem port to a Defold native extension
- Host: GitHub
- URL: https://github.com/britzl/defold-lfs
- Owner: britzl
- License: mit
- Created: 2017-06-12T10:25:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-06-11T05:44:56.000Z (6 months ago)
- Last Synced: 2024-10-04T22:10:48.179Z (3 months ago)
- Topics: defold, defold-library, luafilesystem
- Language: C
- Size: 105 KB
- Stars: 10
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-defold - Defold-LFS
README
# Defold-LFS
This is a [Defold](https://www.defold.com) native extension for the [LuaFileSystem](http://keplerproject.github.io/luafilesystem/) library.## System requirements
The extension does not support HTML5 but works on all other platforms where native extensions is currently supported.## Installation
You can use Defold-LFS in your own project by adding this project as a [Defold library dependency](http://www.defold.com/manuals/libraries/). Open your game.project file and in the dependencies field under project add:https://github.com/britzl/defold-lfs/archive/master.zip
Or point to the ZIP file of a [specific release](https://github.com/britzl/defold-lfs/releases).
## Usage
Once you have Defold-LFS added to your project you can use lfs just like you would normally use it. Please refer to the [LuaFileSystem reference](https://lunarmodules.github.io/luafilesystem/manual.html#reference) for full usage instructions. Brief API overview:lfs.attributes (filepath [, aname | atable])
lfs.chdir (path)
lfs.lock_dir(path, [seconds_stale])
lfs.currentdir ()
iter, dir_obj = lfs.dir (path)
lfs.lock (filehandle, mode[, start[, length]])
lfs.link (old, new[, symlink])
lfs.mkdir (dirname)
lfs.rmdir (dirname)
lfs.setmode (file, mode)
lfs.symlinkattributes (filepath [, aname])
lfs.touch (filepath [, atime [, mtime]])
lfs.unlock (filehandle[, start[, length]])## Example
There's an example in the examples folder showing a file browser implemented using Defold-LFS.## Credits
Graphics in example by [Kenney](http://www.kenney.nl)