Commit Graph

119 Commits

Author SHA1 Message Date
Alex Szpakowski 640e8f0d2e love.filesystem.mount can accept a Data object containing zipped data.
- Add mount(Data, archivename, mountpoint [, appendtopath]). 'archivename' must be a string that has not been used with mount before.
- Add mount(FileData, mountpoint [, appendtopath]). The file path of the FileData is used as the archive name.
- Add unmount(Data).
- unmount(archivename) also works.
2017-12-16 23:09:15 -04:00
Alex Szpakowski ce46fa3ebe Remove PhysFS 2.x-specific code, it's no longer needed since we always have PhysFS 3. 2017-12-16 19:56:02 -04:00
Alex Szpakowski 1d8a3326b3 Include the physfs 3.0.1 source in love. 2017-12-15 19:41:17 -04:00
Alex Szpakowski bf67d7ad0e PHYSFS_enumerateFiles bug has been fixed post-2.1.0.
--HG--
branch : minor
2017-09-04 01:18:48 -03:00
Alex Szpakowski e4e4c6673e Use PhysFS_getErrorByCode instead of PhysFS_getLastError, when available.
--HG--
branch : minor
2017-09-03 19:47:46 -03:00
Alex Szpakowski 9d0e984c3d Add love.filesystem.getInfo. Deprecate love.filesystem.exists/isDirectory/isFile/isSymlink/getLastModified/getSize. Resolves issue #641.
--HG--
branch : minor
2017-08-27 18:14:54 -03:00
Alex Szpakowski 7566db14f2 love.filesystem.isFile and isDirectory behave consistently between PhysFS 2.0 and 2.1/3.0 (see issue #641).
--HG--
branch : minor
2017-08-06 00:53:49 -03:00
Alex Szpakowski abb72cb813 Happy new year! 🥂
--HG--
branch : minor
2017-01-02 01:28:29 -04:00
Alex Szpakowski 31b44797bc Merge default into minor
--HG--
branch : minor
2016-05-12 18:20:01 -03:00
T-Bone 4ef7504c05 Fixed things pointed out by Alex Szpakowski and Bart von Strien 2016-04-09 07:28:03 +02:00
T-Bone b2291fb62a Fixes to make Löve compile on Windows 10 UWP 2016-04-07 22:56:03 +02:00
Alex Szpakowski 734789eb93 Added love.math.encode(format, data | string [, linelength]) and love.math.decode(format, data | string). Current formats are "base64" and "hex". The optional line length only applies to base64 and specifies the maximum number of characters per line in the encoded string.
Removed the variant of love.filesystem.newFileData which decoded a base64-encoded string since it's redundant.

--HG--
branch : minor
2016-03-28 19:28:40 -03:00
Bart van Strien 33341de7bc Rewrite the c module loader, adding a search path (fixes #1050)
Note: also removes the restriction that only fused games can load libraries from
their save folders.

--HG--
branch : minor
2016-02-26 15:24:01 +01:00
Alex Szpakowski 8566729229 Merged in Bobbyjones/love/new-conf-flag-for-android-2 (pull request #53)
New conf flag for android 2
2016-01-10 20:11:34 -04:00
BobbyJones 3aa51763e2 made a method for setting external save location on android 2016-01-02 18:52:25 -05:00
Alex Szpakowski 46a2e7b85c Happy new year! 🎉 2016-01-01 00:05:06 -04:00
BobbyJones 3c83fb8626 Added a flag that changes android storage from internal to external. 2015-12-31 01:28:00 -05:00
Alex Szpakowski b56a0cfc3d Avoid hard crashes when calling love.filesystem functions if love.filesystem.init was never called.
This only applies when liblove is used directly, as love.filesystem.init is called automatically when the love executable starts up.
2015-12-24 22:53:48 -05:00
Alex Szpakowski de0b63a48d Re-added love.filesystem.exists.
If PhysFS 2.1-alpha is used and a directory is symlinked, isDirectory will return false (whereas it will return true when PhysFS 2.0 is used.) exists will return true in all cases.
2015-12-11 23:17:49 -04:00
Alex Szpakowski 7ee02e8d37 Fixed most PhysFS deprecated call warnings on iOS/Android. 2015-12-09 17:22:46 -04:00
Alex Szpakowski b0c19ef2c5 Renamed love.window.set/isScreenSaverEnabled to love.window.set/isDisplaySleepEnabled. 2015-11-24 22:35:57 -04:00
Alex Szpakowski c9c772613c Enable symlinks by default (resolves issue #1072.) 2015-09-07 17:10:14 -03:00
Alex Szpakowski d3d970b925 Renamed iOS.mm and iOS.h to ios.mm and ios.h, to match the naming conventions of other files. 2015-08-27 18:46:04 -03:00
Martin Felis 19b7d1e115 Implemented love.filesystem support for Android. 2015-08-13 19:42:31 -03:00
Alex Szpakowski 3199482c3b Fixed filesystem writing on iOS. 2015-07-03 20:34:25 -03:00
Alex Szpakowski e7f56241ec Removed the callback argument from love.filesystem.getDirectoryItems (resolves issue #877.)
Cleaned up the getDirectoryItems ccde to no longer call Lua API functions from Filesystem.cpp (now it's all in wrap_Filesystem.cpp.)
2015-04-25 00:16:10 -03:00
Alex Szpakowski cf0968fc6d Avoid some VC++ compiler warnings 2015-04-02 00:28:09 -03:00
Alex Szpakowski aac4b3487a Replace deprecated PHYSFS_addToSearchPath calls with PHYSFS_mount.
--HG--
branch : minor
2015-02-22 17:48:32 -04:00
Alex Szpakowski ebc68023a7 Fix many warnings about implicit integer conversions when compiling for 64 bits.
--HG--
branch : minor
2015-02-20 01:20:08 -04:00
Alex Szpakowski 85de3c41fb Initial iOS implementation.
--HG--
branch : minor
2015-02-20 00:21:21 -04:00
Alex Szpakowski 24c7539182 Updated some Xcode project settings
--HG--
branch : minor
2015-02-18 23:04:01 -04:00
Alex Szpakowski c2628fe4f9 Added a workaround for a bug in PhysFS 2.1-alpha involving trailing slashes and PHYSFS_enumerateFiles.
--HG--
branch : minor
2015-02-16 00:27:17 -04:00
Alex Szpakowski a7e4148869 Merged default into minor
--HG--
branch : minor
2015-01-16 15:47:26 -04:00
Bart van Strien 13594e3e38 Add missing include
--HG--
branch : minor
2015-01-14 15:16:04 +01:00
Alex Szpakowski c7b45b3505 Updated copyright for the new year 2014-12-31 19:32:43 -04:00
Alex Szpakowski d4be84a630 Fixed love.filesystem.unmount.
--HG--
branch : minor
2014-10-19 01:52:48 -03:00
Alex Szpakowski 8d0654a6a7 Added runtime drag-and-drop file and folder support via new love.filedropped and love.directorydropped event callback functions. filedropped has a single File object argument, and directorydropped has a single string argument containing the full path of the directory, which can be used with love.filesystem.mount.
--HG--
branch : minor
2014-10-18 20:30:36 -03:00
Alex Szpakowski 8edb90a719 Added support for loading BMFont bitmap font files with love.graphics.newFont (see issue #190.) Some esoteric BMFont features are not supported.
Moved the Font module Lua wrapper code out of the freetype implementation folder.

--HG--
branch : minor
2014-09-28 16:00:40 -03:00
Bart van Strien 5b4ef23772 Move require path into filesystem module
--HG--
branch : minor
2014-09-05 07:57:42 +02:00
Alex Szpakowski aa05664d4c Merged default into minor
--HG--
branch : minor
2014-07-30 01:32:10 -03:00
Alex Szpakowski 73c0f1e222 Added love.filesystem.isSymlink, love.filesystem.setSymlinksEnabled, and love.filesystem.areSymlinksEnabled. Symbolic link support is disabled by default.
love.filesystem.isSymlink will always return false when symbolic link support is disabled, even if the given filepath is actually a symlink.
2014-07-24 00:31:11 -03:00
Alex Szpakowski d52bab4221 Updated the new module changes to use more compile/link-time checking rather than runtime checking. 2014-07-21 15:12:01 -03:00
Alex Szpakowski 014b9a46e5 Updated the Lua wrapper code for modules to account for cases where the module's instance is removed from memory completely and recreated during the program's lifetime. 2014-07-21 14:52:01 -03:00
Bart van Strien 59ab602111 Normalize slashes in paths unless they are direct user input (XDG_DATA_HOME/APPDATA, specifically) 2014-07-15 13:16:37 +02:00
Alex Szpakowski 53b20b63a5 Merged default into minor
--HG--
branch : minor
2014-05-21 21:16:37 -03:00
Alex Szpakowski e25cdfc71c Fixed creating and setting the write directory on some sandboxed operating systems 2014-05-05 00:27:42 -03:00
Alex Szpakowski 9d293af176 Fixed love.filesystem.setIdentity breaking if a file has been written to an old identity dir before the new setIdentity call 2014-05-04 04:10:46 -03:00
Alex Szpakowski 4d579074a1 Removed love.filesystem.exists (resolves issue #641.)
Use either love.filesystem.isFile or love.filesystem.isDirectory instead.

--HG--
branch : minor
2014-04-23 02:15:02 -03:00
Alex Szpakowski aba17607aa Added an optional callback function argument to love.filesystem.getDirectoryItems. Callback function takes a single argument containing a filepath string.
For example: love.filesystem.getDirectoryItems("", print)
2014-03-17 20:14:53 -03:00
Alex Szpakowski a13fd761cc Updated love.filesystem's C library loader for require to look in paths added via love.filesystem.mount, when in fused mode 2014-03-12 06:19:56 -03:00