m1maker / NGT

New open source game toolkit
https://ngtcode.dev/
20 stars 11 forks source link

New features #11

Open bobi6666 opened 6 months ago

bobi6666 commented 6 months ago

please add new methods: string get_current_directory, bool file exists double get_file_size

m1maker commented 6 months ago

There are such functions. class filesystem{ string get_current_path() const; }; And there really is no file_exists function

bobi6666 commented 6 months ago

yes thanks. also file_exists and double get_file_size should be very usefull methods

2024-01-08 13:45 GMT+01:00, m1maker @.***>:

There are such functions. class filesystem{ string get_current_path() const; }; And there really is no file_exists function

-- Reply to this email directly or view it on GitHub: https://github.com/m1maker/NGT/issues/11#issuecomment-1880940314 You are receiving this because you authored the thread.

Message ID: @.***>

bobi6666 commented 6 months ago

but if i do alert("",get_current_path()); it does not work

2024-01-08 13:52 GMT+01:00, Peter Kubek @.***>:

yes thanks. also file_exists and double get_file_size should be very usefull methods

2024-01-08 13:45 GMT+01:00, m1maker @.***>:

There are such functions. class filesystem{ string get_current_path() const; }; And there really is no file_exists function

-- Reply to this email directly or view it on GitHub: https://github.com/m1maker/NGT/issues/11#issuecomment-1880940314 You are receiving this because you authored the thread.

Message ID: @.***>

bobi6666 commented 6 months ago

I already figured out how to do it, but when I tried write_string and file open with wb flag, the file was not created in the folder

2024-01-08 14:01 GMT+01:00, Peter Kubek @.***>:

but if i do alert("",get_current_path()); it does not work

2024-01-08 13:52 GMT+01:00, Peter Kubek @.***>:

yes thanks. also file_exists and double get_file_size should be very usefull methods

2024-01-08 13:45 GMT+01:00, m1maker @.***>:

There are such functions. class filesystem{ string get_current_path() const; }; And there really is no file_exists function

-- Reply to this email directly or view it on GitHub: https://github.com/m1maker/NGT/issues/11#issuecomment-1880940314 You are receiving this because you authored the thread.

Message ID: @.***>

harrymkt commented 5 months ago

file open with wb flag

wb doesn't exist in NGT at all. only, a r w