Description

[Made for GameMaker Studio 1.4 and GameMaker Studio 2]

This extension is for Windows, macOS, and Ubuntu.

Manage files and folders, (whether inside or outside of the sandbox), with the greatest of ease.

Functions included:

  • real file_copy_fmns(string fname,string newname)

  • real file_rename_fmns(string oldname,string newname)

  • real file_exists_fmns(string fname)

  • real file_delete_fmns(string fname)

  • real directory_create_fmns(string dname)

  • real directory_copy_fmns(string dname,string newname)

  • real directory_rename_fmns(string oldname,string newname)

  • real directory_exists_fmns(string dname)

  • real directory_destroy_fmns(string dname)

  • real set_working_directory_fmns(string dname)

  • string working_directory_fmns()

  • string program_directory_fmns()

  • string temp_directory_fmns()

The DLL's full source code included.

Very big thanks to Josh Ventura, for writing the widen() and shorten() scripts, enabling UTF-8 support on Windows.

End User Licence Agreement (EULA).

Changes in 3.0.0

Please replace all Scripts and Included Files in your existing projects to apply this update!!!

  • [All Platforms] Added function temp_directory_fmns().

Version 3.0.0. Published October 10, 2018

Created with GameMaker: Studio v1.4.1804

Age Rating: 4+

Average Rating

Your review

You can only review assets you've bought.


Gravatar

Brandon S 25 November 2018


Gravatar

Anonymous 08 October 2018

This review was left for a previous version of this asset.


Gravatar

Paul C 01 September 2018

Great!

Great cross-platform solution for out-of-the-sandbox file access.

I've tested this on my game on both windows and Mac and it works smoothly on both platforms.

At the time of writing there is a bug in the built-in GML functions that prevents getting out of the sandbox, so this solution is perfect for my needs.

Author has been responsive and adding updates to the asset frequently.

This review was left for a previous version of this asset.

Logo

Samuel Venable (Publisher) 04 September 2018

Hi Paul C.

Thank you for the positive review. I am glad I was able to help!

Regards
Samuel


Gravatar

Anonymous 22 August 2018

This review was left for a previous version of this asset.


Gravatar

Anonymous 14 March 2018

No problems yet

Works great! Just what I needed!

This review was left for a previous version of this asset.


Gravatar

Amy M 15 January 2018

Works great!

This seems to work exactly as it should, thanks! Any chance of Mac compatibility in the future?

This review was left for a previous version of this asset.

Logo

Samuel Venable (Publisher) 15 August 2018

Hi Amy M.

Support for macOS has been officially added today. :)

Regards,
Samuel


Gravatar

Anonymous 02 December 2017

Writing to files?

It works great if you're just pulling in a bunch of read-only files dynamically, but I can't seem to write to the save area then copy that file elsewhere using file_copy_fmns().

This review was left for a previous version of this asset.

Logo

Samuel Venable (Publisher) 04 December 2017

Hi.

Try this, which I just tested and verified it works on my end:

f = file_text_open_write(game_save_id + "example.txt");
file_text_write_string(f, "this is an example text file");
file_text_close(f);

file_copy_fmns(game_save_id + "example.txt", working_directory + "example.txt");

/* Basically, you write/edit files when they are in your sandbox folder (a.k.a. game_save_id).
Then, you can copy the files in and out of there as needed. Remember to test a compiled game.

Enjoy!
Samuel


Gravatar

Anonymous 20 August 2017

This guy is honestly the best :)

The rename script doesn't work for me. All it just does it delete the file when it attempts to rename it.

The code [Left Pressed]

if global.fileopen = ""
{
show_message("No File Selected")
} else {
newname = get_string("Enter a new name for this file",string (filename_name(global.fileopen)))
file_rename_fmns((global.fileopen),newname)
}
#####################################
global.fileopen = a file that the user opened

EDIT
(Thanks, it works now)

This review was left for a previous version of this asset.

Logo

Samuel Venable (Publisher) 20 August 2017

Hi. Thanks for the review and compliment. :)

It's not working because you need to specify the path to the file for both arguments.

As an example, if you are using get_open_filename, you may use filename_path like so:

// Left Pressed
global.fileopen = get_open_filename("","")
if global.fileopen = ""
{
show_message("No File Selected")
} else {
newname = get_string("Enter a new name for this file",string(filename_name(global.fileopen)))
file_rename_fmns((global.fileopen),filename_path(global.fileopen)+newname)
}

Package contents

Loading, please wait

What is the issue?

Back to Top