View Single Post
Old 12-12-2018, 10:51 AM  
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,447
Default

Perhaps something simpler?

The following should give you the path in t[1] and the file names in the rest of the table:
(Except if #t == 1, in which case the entire path and filename is in t[1].)
Code:
t = {}
for file in files:gmatch("[^\0]*")
    t[#t+1] = file
end

Last edited by juliansader; 03-21-2019 at 05:13 AM.
juliansader is offline   Reply With Quote