mirror of
https://github.com/EngineerSmith/nativefs.git
synced 2025-11-08 23:15:02 +00:00
cleanup
This commit is contained in:
@@ -56,7 +56,7 @@ Function names in this list are links to their LÖVE `File` counterparts. `File`
|
|||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
```
|
```lua
|
||||||
local nativefs = require("nativefs")
|
local nativefs = require("nativefs")
|
||||||
|
|
||||||
-- deletes all files in C:\Windows
|
-- deletes all files in C:\Windows
|
||||||
|
|||||||
@@ -301,10 +301,9 @@ function nativefs.newFileData(filepath)
|
|||||||
local ok, err = f:open('r')
|
local ok, err = f:open('r')
|
||||||
if not ok then return nil, err end
|
if not ok then return nil, err end
|
||||||
|
|
||||||
local data, err = f:read()
|
local data, err = f:read('data', 'all')
|
||||||
f:close()
|
f:close()
|
||||||
if not data then return nil, err end
|
return data, err
|
||||||
return love.filesystem.newFileData(data, filepath)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function nativefs.mount(archive, mountPoint, appendToPath)
|
function nativefs.mount(archive, mountPoint, appendToPath)
|
||||||
|
|||||||
Reference in New Issue
Block a user