Love2D I/O to any directory?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Skeletonxf
Citizen
Posts: 87
Joined: Tue Dec 30, 2014 6:07 pm

Re: Love2D I/O to any directory?

Post by Skeletonxf »

Wouldn't you need different binaries again for Android and iOS?
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: Love2D I/O to any directory?

Post by bobbyjones »

Yeah. Idk if luafilesystem works on those platforms.

But it doesn't matter to the OP. He is making a desktop application presumably.
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Love2D I/O to any directory?

Post by Positive07 »

Fused games can load dlls from the Save folder (applies to all platforms)

Also I must point out this library which may fit better what you need. I'm pointing to my pull-request since there are instructions for building on Windows, you could also build it for Linux using GTK file dialogs or in MacOS X where you would get native Cocoa file dialogs, you just need to compile, package the library with your game and require "nfs" which provides three functions, each returns a path to the file selected:

Code: Select all

local nfs = require "nfs"

--Open a file from the image folder, filters them out by image extensions
local path = nfs.open("png;jpg,jpeg;bmp", "C:\Users\user\Images") 
print(path)

--There is also nfs.openMany(filter, path) which lets the user pick multiple files and returns a table with all the files paths

--And there is also nfs.save(filter, path) which works the same way as nfs.open
All functions are blocking, if you don't want to block the game run them from a thread
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Dangerous beetle, Google [Bot] and 8 guests