First of all: love.graphics.newImage(path) can't seem to open anything outside the current directory. Am I doing something wrong? (so far only tested on Windows 7)
I need it to open any file for a vertex editor. (render an image as background, then the user can make a polygon over it. it sucks having to move the image file :E)
Second: for the previously mentioned project I made a library for handling various vertex functions (loading/saving, automatic UV, bounding box/quad, etc)
I moved it into a separate directory which I want to use for my libraries. I deleted the original in the vertex editor's directory and made a symlink to it. Now require"verts" fails, also I can't open the symlink in ZBStudio, but that's a different matter.
The file system is an external HDD formatted with NTFS and everything has rwx access. (Configured with Ntfs-tools)
Running Ubuntu 14.10 x64.
various file system questions
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: various file system questions
love.filesystem is contained to the .love (or game directory) and the write directory.
Help us help you: attach a .love.
Re: various file system questions
Love.filesystem as well as any LÖVE loading function
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: various file system questions
If you gain access to the image in some other way you can create an ImageData from the data itself.
Re: various file system questions
Yes, but the loading function themselves don't provide access to external folders
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
Re: various file system questions
Yeah, like I said there are other ways of opening files than love.filesystem. with those you can access other files.Nixola wrote:Yes, but the loading function themselves don't provide access to external folders
Re: various file system questions
To open files elsewhere use the functions that are built into lua (they are harder to use though). Or you can just use this viewtopic.php?f=5&t=9479
My Tox ID: 0F1FB9170B94694A90FBCF6C4DDBDB9F58A9E4CDD0B4267E50BF9CDD62A0F947E376C5482610
Re: various file system questions
I know Lua's io functions, so I assumed require would work.
I have tried passing a file handle to the newImage function, but of course it did not work. An ugly workaround could be making a local copy.
What I still don't get is why my symlink is not working?
I have tried passing a file handle to the newImage function, but of course it did not work. An ugly workaround could be making a local copy.
What I still don't get is why my symlink is not working?
Re: various file system questions
Use the link I gave you. It does ALL the work for you. It work perfectly!
My Tox ID: 0F1FB9170B94694A90FBCF6C4DDBDB9F58A9E4CDD0B4267E50BF9CDD62A0F947E376C5482610
Re: various file system questions
I've checked it, but for something as simple as loading my modules, I didn't want to include another module in each project. I think I'll use it for the editor's file loading though.
Of course no one thought of the most obvious solution:
package.path=package.path..";../Libs/?.lua"
...like seriously, I feel so stupid right now.
Of course no one thought of the most obvious solution:
package.path=package.path..";../Libs/?.lua"
...like seriously, I feel so stupid right now.
Who is online
Users browsing this forum: No registered users and 6 guests