Title pretty much explains the problem; when i use following code with " C:/ " , it puts out like 4 entries when there are way more , i suppose that a hidden folder somehow messes up the reading process.
When i use the same code with "C:/program_x/" it puts out the right amount of folders ; there are no hidden folders.
folder_list as string [] : text_list as integer []
Load_Folder_List ("raw:C:/",folder_list) : Display_String_Array (100,100,200,400,1,folder_list.length,folder_list,text_list)
do
if getrawkeypressed(27) then end
Print( folder_list.length )
Sync()
loop
Function Load_Folder_List ( dir$, folder_list ref as string [] )
if folder_list.length < 0 then folder_list.length = 0 : folder = OpenRawFolder( dir$ ) : nr_folders = GetRawFolderNumFiles(folder)
For x = 1 to nr_folders : folder_name$ = GetRawFolderFolderName(folder,x-1) : if trimstring(folder_name$," ") <> "" then folder_list.insert(folder_name$) : next x
Endfunction
Function Display_String_Array (x,y,width, height ,startpoint, endpoint, array as string [], display_text ref as integer [] )
part_length = endpoint-startpoint+1: display_text.length = part_length : size = height / part_length
for x = startpoint to endpoint : display_text[x] = CreateText(array[x]) :
SettextPosition (display_text[x],x,y+(x-1)*size) : SettextSize(display_text[x],size) : settextmaxwidth(display_text[x],width)
While GettextTotalHeight(display_text[x]) > size : SettextSize(display_text[x],Gettextsize(display_text[x])/2) : Endwhile
next x
Endfunction