added File:type() and File:typeOf()

This commit is contained in:
Grump
2020-06-12 13:12:46 +02:00
parent e71f08c1e3
commit c84a058772
3 changed files with 16 additions and 10 deletions

View File

@@ -31,7 +31,7 @@ Link in this list point to their `love.filesystem` counterparts. All functions a
Functions that are not available in `love.filesystem`:
* `nativefs.getDirectoryItemsInfo(path)`
Returns a list of items in a directory that contains not only the names, but also the information returned by `getInfo` for each item. The return value is a list of files, in which each entry is a table as returned by [getInfo](https://love2d.org/wiki/love.filesystem.getInfo), with an additional `name` field for each file.
Returns a list of items in a directory that contains not only the names, but also the information returned by `getInfo` for each item. The return value is a list of files and directories, in which each entry is a table as returned by [getInfo](https://love2d.org/wiki/love.filesystem.getInfo), with an additional `name` field for each entry.
* `nativefs.getDriveList()`
Returns a table of all populated drive letters on Windows (`{ 'C:/', 'D:/', ...}`). On systems that don't use drive letters, a table with the single entry `/` is returned.
@@ -58,6 +58,8 @@ Changes the working directory.
* [File:seek](https://love2d.org/wiki/\(File\):seek)
* [File:tell](https://love2d.org/wiki/\(File\):tell)
* [File:flush](https://love2d.org/wiki/\(File\):flush)
* [File:type](https://love2d.org/wiki/Object:type)
* [File:typeOf](https://love2d.org/wiki/Object:typeOf)
* [File:release](https://love2d.org/wiki/Object:release)
Function names in this list are links to their LÖVE `File` counterparts. `File` is designed to work the same way as LÖVE's `File` class.