Loading modules from documents folder

Hello,

    Can you load modules from the “Documents” folder of a project? If I keep the module in the same directory as my “main.lua” file it works fine. However, when I try “local ex1 = require ( “Documents.MOD” )” I get an error saying its not a directory. Is this a permissions/security feature?

Question: To be clear, you’re not conflating the system.DocumentsDirectory folder with a folder in your root (system.ResourceDirectory) called “Documents” are you?

  1. You cannot load scripts from anywhere but the system.ResourceDirectory and sub-directories therein.

  2. You can create folders in system.ResourceDirectory  and load from them like this:

a. Create a folder called “bobby”.

b. Create a module called  “sue.lua” and add it to the folder “bobby”

c. Require “sue.lua” as follows

local sue = require "bobby.sue"

That’s what I feared. Thanks man

Question: To be clear, you’re not conflating the system.DocumentsDirectory folder with a folder in your root (system.ResourceDirectory) called “Documents” are you?

  1. You cannot load scripts from anywhere but the system.ResourceDirectory and sub-directories therein.

  2. You can create folders in system.ResourceDirectory  and load from them like this:

a. Create a folder called “bobby”.

b. Create a module called  “sue.lua” and add it to the folder “bobby”

c. Require “sue.lua” as follows

local sue = require "bobby.sue"

That’s what I feared. Thanks man