25 lines
538 B
GDScript3
25 lines
538 B
GDScript3
|
extends Node
|
||
|
|
||
|
var versions_dir_path = OS.get_config_dir()+"/UltraFlare/versions/"
|
||
|
var versions_dir = Directory.new()
|
||
|
|
||
|
func get_versions():
|
||
|
var versions = []
|
||
|
versions_dir.open(versions_dir_path)
|
||
|
versions_dir.list_dir_begin(true)
|
||
|
|
||
|
var file_name = versions_dir.get_next()
|
||
|
while file_name != "":
|
||
|
versions.append(file_name)
|
||
|
file_name = versions_dir.get_next()
|
||
|
|
||
|
versions_dir.list_dir_end()
|
||
|
|
||
|
return versions
|
||
|
|
||
|
|
||
|
func _ready():
|
||
|
if not versions_dir.dir_exists(versions_dir_path):
|
||
|
versions_dir.make_dir_recursive(versions_dir_path)
|
||
|
|