love.filesystem.newFile(path) returns 'file does not exist'

Issue #86 resolved
created an issue

I just started learning love-engine and still don't know of 'famous' issues. I tried to print out _G in file and found that this example doesn't work for me: {{{


file = love.filesystem.newFile("data.txt") file:open('r') data = file:read() }}}

I created test project with _G.lua: {{{


class:publick 'OnInit' function OnInit:__init() local bg ='testbg.jpg') local width = bg:getWidth() local height = bg:getHeight() local file = love.filesystem.newFile('data.txt')



love.draw = OnInit }}}

The main.lua is: {{{


require 'scripts/__mainreq' require 'scripts/_G' }}}

Version of Love i loaded is 0.6.2, beta-ver i didn't try yet.

Comments (5)

  1. Archinamon reporter

    Well, i thought that newFile() func creates it, isn't it? Anyway, i tried to load a pre-created file, but still no result with it... Maybe there is special chain of functions to be called?

  2. Log in to comment