Page 1 of 1

Love.filesystem problems.

Posted: Mon Oct 21, 2013 8:51 pm
by Engineer
Hello there,

Currently I am trying to write a proper Music Player (I tried that in the past but then I had zero experience with Löve), but I am completely stumped. It seems that the love.filesystem.[exists|isDirectory|isFile] are definitely incorrect. I have tried it with the attached love zip, but it seems that it prints false (dont worry, I dont want to reveal my irl name so you have to fill in your actual computer name into the code. Also, a cmd prompt always is set to true so you have nothing to do with the config, at least Im hoping that ;p ).

I can write to files and crap in the Appdata folder on my computer, but I cannot seem to check if something exists in that directory, or even directories under the Roaming folder.

Any help is appreciated :)
- Engineer

Re: Love.filesystem problems.

Posted: Mon Oct 21, 2013 8:53 pm
by bartbes
All of love.filesystem is relative to the game directory (and save directory), and it does not accept windows-style paths.

Re: Love.filesystem problems.

Posted: Mon Oct 21, 2013 9:01 pm
by Engineer
bartbes wrote:All of love.filesystem is relative to the game directory (and save directory), and it does not accept windows-style paths.
Well that is quite useless, honestly.

Re: Love.filesystem problems.

Posted: Mon Oct 21, 2013 9:03 pm
by slime
love.filesystem is not designed to be a general purpose filesystem API. It does what it is meant to do very well, and it's hardly useless in the context of games. :)

I don't recommend using LÖVE as a traditional music player. You could, but not all tools are designed for all purposes, and you'll have a better time using another tool I think.

Re: Love.filesystem problems.

Posted: Mon Oct 21, 2013 9:32 pm
by Engineer
slime wrote:love.filesystem is not designed to be a general purpose filesystem API. It does what it is meant to do very well, and it's hardly useless in the context of games. :)

I don't recommend using LÖVE as a traditional music player. You could, but not all tools are designed for all purposes, and you'll have a better time using another tool I think.
For a matter of fact, I know. But Im writing this for my own purposes, so it shouldnt matter anyway.

The thing it though, what other tool should I use?

Edit:
I just have overwritten all the love functions to do what I expect them what to do. Did I upset the LÖVE framework somehow by overwriting those functions? (Jut to be sure )

Re: Love.filesystem problems.

Posted: Tue Oct 22, 2013 7:05 am
by Lafolie
Engineer wrote: Edit:
I just have overwritten all the love functions to do what I expect them what to do. Did I upset the LÖVE framework somehow by overwriting those functions? (Jut to be sure )
Shouldn't think so. What you will find though is that you now have to compile and distribute binaries for each platform since the official builds differ in functionality. Basically, you can't distribute your .love file without the modifications.

Unless you changed the functions using just Lua. Even then, if you used additional Lua extensions you'll have to distribute those too.

Re: Love.filesystem problems.

Posted: Tue Oct 22, 2013 7:49 am
by Boolsheet
We don't know what you did, it's hard to tell what will happen.

LÖVE relies on known functions to work with a certain behaviour and if you change it, it has a chance of breaking. We already had that with print. I recommend you make separate functions for the accesses outside of the game and save directory. Since you're not going to distribute it, I guess you don't have to worry about cross-platform issues and all that.

Re: Love.filesystem problems.

Posted: Thu Oct 24, 2013 8:07 pm
by tavuntu
If you're making a music player, you shouldn't be using löve... just saying.

Re: Love.filesystem problems.

Posted: Thu Oct 24, 2013 8:09 pm
by tavuntu
If you want to do something different, it's a good idea, go on, but you should choose the proper tool to do it.