Use

s.folder_content(folder, options)

Description

Returns a list of all contents in a specified folder as an array. Passing the option “invert” will sort the list in reverse alphabetical order.

Example

v.thefolderlist = s.folder_content("/somefolder")