Love.filesystem problems.

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.
Post Reply
Engineer
Prole
Posts: 13
Joined: Mon Aug 05, 2013 9:30 pm

Love.filesystem problems.

Post 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
Attachments
test.love
(632 Bytes) Downloaded 278 times
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: Love.filesystem problems.

Post by bartbes »

All of love.filesystem is relative to the game directory (and save directory), and it does not accept windows-style paths.
Engineer
Prole
Posts: 13
Joined: Mon Aug 05, 2013 9:30 pm

Re: Love.filesystem problems.

Post 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.
User avatar
slime
Solid Snayke
Posts: 3166
Joined: Mon Aug 23, 2010 6:45 am
Location: Nova Scotia, Canada
Contact:

Re: Love.filesystem problems.

Post 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.
Engineer
Prole
Posts: 13
Joined: Mon Aug 05, 2013 9:30 pm

Re: Love.filesystem problems.

Post 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 )
User avatar
Lafolie
Inner party member
Posts: 809
Joined: Tue Apr 05, 2011 2:59 pm
Location: SR388
Contact:

Re: Love.filesystem problems.

Post 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.
Do you recognise when the world won't stop for you? Or when the days don't care what you've got to do? When the weight's too tough to lift up, what do you? Don't let them choose for you, that's on you.
User avatar
Boolsheet
Inner party member
Posts: 780
Joined: Wed Dec 29, 2010 4:57 am
Location: Switzerland

Re: Love.filesystem problems.

Post 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.
Shallow indentations.
User avatar
tavuntu
Citizen
Posts: 65
Joined: Mon Dec 24, 2012 6:56 am
Contact:

Re: Love.filesystem problems.

Post by tavuntu »

If you're making a music player, you shouldn't be using löve... just saying.
User avatar
tavuntu
Citizen
Posts: 65
Joined: Mon Dec 24, 2012 6:56 am
Contact:

Re: Love.filesystem problems.

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests