Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

module 'lfs' not found
Started by scsebidi Apr 21 2015 02:11 AM

3 replies to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

scsebidi

[GLOBAL: userInfoPane.html]
scsebidi
  • Observer

  • 2 posts
  • Corona SDK

Good Day 

 

Hey developers i'm using visual studio to build my project which i'm using LuaFileSystem lfs=require("lfs"), when running the simulator i get this error:

 

module 'lfs' not found:
no field package.preload['lfs']
no file 'C:\Data\Programs\{D7C4DBDC-44FD-40DF-9DDC-3615142304A7}\Install\lfs.lua'
no file 'C:\Data\Programs\{D7C4DBDC-44FD-40DF-9DDC-3615142304A7}\Install\Assets\Corona\lfs.lua'
no file 'C:\Data\Programs\{D7C4DBDC-44FD-40DF-9DDC-3615142304A7}\Install\Assets\Corona\lfs.lua'
no file '.\lfs.lua'
no file '!\lua\lfs.lua'
no file '!\lua\lfs\init.lua'
no file '!\lfs.lua'
no file '!\lfs\init.lua'
no file 'C:\Data\Programs\{D7C4DBDC-44FD-40DF-9DDC-3615142304A7}\Install\lfs.dll'
no file '.\lfs.dll'
no file 'C:\Data\Programs\{D7C4DBDC-44FD-40DF-9DDC-3615142304A7}\Install\Assets\Corona\lfs.dll'
no file '.\lfs.dll'
no file '!\lfs.dll'
no file '!\loadall.dll'
stack traceback:
[C]: in function 'require'

?: in function 'require' 

 

can anyone help????????

 

kind regards

clifford



[TOPIC: post.html]
#2

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

LFS (Lua File System) library is not supported on WP8.  This is a 3rd party library (not developed by Corona Labs) which does not compile for this platform.  So, you can't use it for the time being.

 

You can see what APIs/features are supported on WP8 here...

   http://docs.coronalabs.com/daily/coronacards/wp8/support.html



[TOPIC: post.html]
#3

scsebidi

[GLOBAL: userInfoPane.html]
scsebidi
  • Observer

  • 2 posts
  • Corona SDK

ok thanks, so how can i overcome such situation?



[TOPIC: post.html]
#4

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

You can't use the LFS library on WP8.  So, you have to avoid loading it and using it like this...

-- Load the LFS library, if it is available.
local lfs = nil
if (system.getInfo("platform") ~= "WinPhone") then
   lfs = require("lfs")
end

-- Only call LFS APIs if loaded.
if lfs then
   local currentDirectory = lfs.currentdir()
end





[topic_controls]
[/topic_controls]