42 Commits

Author SHA1 Message Date
Engineer Smith
9338e01f62 Merge pull request #4 from zhengying/master
Fixed the missing return value 'r' in File:read.
2024-05-02 20:30:07 +01:00
zhengying
231ddbca41 Fixed the missing return value 'r' in File:read. 2024-04-21 11:53:36 +08:00
EngineerSmith
02a7b3005b Fixed bad example which deleted all files in c:\windows 2023-11-14 19:47:48 +00:00
megagrump
a8ab3c465d create FileData from ByteData if possible 2021-12-13 17:13:32 +01:00
megagrump
dbfefa28c2 check argument type in newFile(), fixes #4 2021-07-11 19:42:30 +02:00
Grump
c01aea7dfa fix absolute path handling in createDirectory 2020-07-23 19:27:48 +02:00
Grump
eb00b9fd0a close file after nativefs.lines() finishes 2020-07-23 19:21:37 +02:00
Grump
985bc56669 add optional init.lua 2020-07-23 08:09:19 +02:00
Grump
8734a3a4e6 add license text, fixes #3 2020-07-23 07:47:56 +02:00
Grump
434dee59fc replace love.path.leaf with local implementation, fixes #1 2020-07-15 07:55:04 +02:00
Grump
fd61ce6e49 test createDirectory with absolute path 2020-07-15 07:25:49 +02:00
Grump
a00b7c9bb2 Merge branch 'zorgnn-patch-1' 2020-07-15 07:23:18 +02:00
zorg
d3d19a0872 Fix nativefs.createDirectory on windows
Currently, createDirectory fails on windows, because a slash is mandatory at the beginning of the absolute path, i.e. with the drive letter and the colon; `C:` fails even the getInfo process without a slash of any kind (\ or /); only `C:\` or `C:/` gets recognized as a correct path.

The change i made, as far as i can tell, won't stop the function from working on linux/osx either, although testing that would probably be a good idea;
the issue i could see is if/when gmatch would return the first directory instead of an empty string in front of the first slash, and if that would fail because the path would expect an initial slash as the root... if it doesn't, then it should work.

But if it does fail, this might not have a clean solution unless the implementation is separated by OS, with current being `'/'` initially on non-windows, and `''` otherwise, alongside my change.
2020-07-12 20:28:43 +02:00
megagrump
085fb62003 Update README.md 2020-07-04 15:05:44 +02:00
Grump
3d4a838105 refactor 2020-06-18 13:01:39 +02:00
Grump
30d36b97e1 updated README 2020-06-18 12:59:19 +02:00
Grump
c84a058772 added File:type() and File:typeOf() 2020-06-12 13:16:32 +02:00
Grump
e71f08c1e3 refactor 2020-06-02 07:41:10 +02:00
Grump
ebf98b4494 some refactoring, better error reporting in File:tell 2020-05-28 14:57:37 +02:00
Grump
81c8d8d3bf added getDirectoryItemsInfo 2020-05-13 19:24:43 +02:00
Grump
ce371945a0 cleanup 2020-05-13 12:48:56 +02:00
Grump
2b1e143f9a cache file size, cleanup 2020-05-12 15:03:16 +02:00
Grump
40a4cb62d3 adjust getDirectoryItems and getInfo behavior with nonexistent files 2020-05-11 20:36:36 +02:00
Grump
77346734b5 cleanup 2020-05-11 10:13:32 +02:00
Grump
f096e09d86 fix crash on Windows 2020-05-11 10:12:43 +02:00
Grump
db63f71fe9 cleanup 2020-05-11 09:58:02 +02:00
Grump
fc5152860e cleanup 2020-05-11 09:45:59 +02:00
Grump
2043c0c5db update README 2020-05-08 11:27:11 +02:00
Grump
a0aeddefec update README 2020-05-08 11:18:21 +02:00
Grump
bb6b013aaf update README 2020-05-08 11:16:15 +02:00
Grump
c99500a4de add test for removal of nonexistent file 2020-05-08 10:31:27 +02:00
Grump
1ebad27d4c README & LICENSE 2020-05-08 10:19:54 +02:00
Grump
e9a059b84c allow remove() of non-existent files 2020-05-08 10:16:51 +02:00
Grump
f97d0d60b6 added missing functions 2020-05-08 10:12:04 +02:00
Grump
bdf6a2fbe1 getInfo 2020-05-08 06:12:54 +02:00
Grump
ea33b521a4 add check if already mounted in getDirectoryItems 2020-05-07 20:16:34 +02:00
Grump
5b72acb17f remove old moonscript code 2020-05-07 19:45:47 +02:00
Grump
e093bc11ec mount, unmount, getDirectoryItems 2020-05-07 19:42:51 +02:00
Grump
40004a90fc .gitignore 2020-05-07 18:50:49 +02:00
Grump
ba9eb1e935 test isEOF, File:read should return FileData 2020-05-07 18:49:55 +02:00
Grump
71b82b2989 several fixes for Windows 2020-05-07 17:28:44 +02:00
Grump
38bcc7d02b initial commit 2020-05-07 16:08:41 +02:00