[Worked Around]love.filesystem.exists problems
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- LÖVEYoungGunnaTeam
- Prole
- Posts: 12
- Joined: Sun Jul 14, 2013 3:22 am
- Location: Mars (The Darker Side)
- Contact:
[Worked Around]love.filesystem.exists problems
I just need help for a simple code file that will check in the "C:\Program Files (x86)\LOVE" directory to check if "love.exe" exists, because i can't seem to get it to work. I know this is a really stupid question, but any and all help is needed. Thanks~
Last edited by LÖVEYoungGunnaTeam on Sun Sep 29, 2013 6:05 pm, edited 1 time in total.
- xXxMoNkEyMaNxXx
- Party member
- Posts: 206
- Joined: Thu Jan 10, 2013 6:16 am
- Location: Canada
Re: love.filesystem.exists problems
I don't think that love filesystem can use that directory, but I'm not an expert in this area.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: love.filesystem.exists problems
love.filesystem is only for the .love (for reading) and for the save directory (for reading and writing).
Why do you need to know if love.exe exists?
Why do you need to know if love.exe exists?
Help us help you: attach a .love.
- LÖVEYoungGunnaTeam
- Prole
- Posts: 12
- Joined: Sun Jul 14, 2013 3:22 am
- Location: Mars (The Darker Side)
- Contact:
Re: love.filesystem.exists problems
I was going to use the LOVE api to try to create a "steam-like" program, and i was going to check to see if that computer could run .love files, but thanks guys.
- slime
- Solid Snayke
- Posts: 3162
- Joined: Mon Aug 23, 2010 6:45 am
- Location: Nova Scotia, Canada
- Contact:
Re: love.filesystem.exists problems
You might be interested in Vapor: http://love2d.org/forums/viewtopic.php?f=5&t=40743
- LÖVEYoungGunnaTeam
- Prole
- Posts: 12
- Joined: Sun Jul 14, 2013 3:22 am
- Location: Mars (The Darker Side)
- Contact:
Re: love.filesystem.exists problems
Thanks slime, that was where i got the idea (other than Steam itself). Thanks for the help guys, i'll try to find a work-around. And know i know the limits of LOVE functions.
Re: love.filesystem.exists problems
You could make a file (probably easier in another language) that gets their os (using love.os) then packages it properly and does it only once. That way it would only have to load once. Complicated, but it could work...
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
- LÖVEYoungGunnaTeam
- Prole
- Posts: 12
- Joined: Sun Jul 14, 2013 3:22 am
- Location: Mars (The Darker Side)
- Contact:
Re: love.filesystem.exists problems
i found a way of running a batch file (very easy language!) that does a "if exist" command from a Lua file. Thank Jesus for the "os.execute" command!
Re: love.filesystem.exists problems
You may still want to use the love.os to execute a specific file. Batch files are only for Windows. It is an easy language, though.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Re: love.filesystem.exists problems
http://lua-users.org/wiki/IoLibraryTutorial
Code: Select all
local function fileExists(filePath)
local success = io.open(filePath,"r")
if (success) then io.close(success) end
return not not success
end
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 5 guests