From 05aa3fd39d52e691fe9b0f1e3d2ca2f561e29913 Mon Sep 17 00:00:00 2001 From: Impact Date: Sat, 27 Aug 2022 01:59:43 +0200 Subject: [PATCH] Update CreateDirectory (#1813) * Update CreateDirectory docs Add default arguments and a note about deep paths. * Update note * Add note about use_valve_fs --- plugins/include/files.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/include/files.inc b/plugins/include/files.inc index d4129bd9..1d8fd3b3 100644 --- a/plugins/include/files.inc +++ b/plugins/include/files.inc @@ -575,7 +575,7 @@ native bool RemoveDir(const char[] path); /** * Creates a directory. * - * @param path Path to create. + * @param path Path to create. Note that directories are not created recursively unless use_valve_fs is used. * @param mode Permissions (default is o=rx,g=rx,u=rwx). Note that folders must have * the execute bit set on Linux. On Windows, the mode is ignored. * @param use_valve_fs If true, the Valve file system will be used instead. @@ -585,7 +585,7 @@ native bool RemoveDir(const char[] path); * In this case, mode is ignored. * @return True on success, false otherwise. */ -native bool CreateDirectory(const char[] path, int mode, bool use_valve_fs=false, const char[] valve_path_id="DEFAULT_WRITE_PATH"); +native bool CreateDirectory(const char[] path, int mode=FPERM_O_READ|FPERM_O_EXEC|FPERM_G_READ|FPERM_G_EXEC|FPERM_U_READ|FPERM_U_WRITE|FPERM_U_EXEC, bool use_valve_fs=false, const char[] valve_path_id="DEFAULT_WRITE_PATH"); /** * Changes a file or directories permissions.