From a28cadd06b9629b953653db4bf20db4cbee5403a Mon Sep 17 00:00:00 2001 From: kenjis Date: Thu, 16 Nov 2023 09:28:41 +0900 Subject: [PATCH 1/5] docs: update outdated description --- user_guide_src/source/helpers/filesystem_helper.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/helpers/filesystem_helper.rst b/user_guide_src/source/helpers/filesystem_helper.rst index 75062ae054a3..eb70a3cc5406 100644 --- a/user_guide_src/source/helpers/filesystem_helper.rst +++ b/user_guide_src/source/helpers/filesystem_helper.rst @@ -2,8 +2,8 @@ Filesystem Helper ################# -The Directory Helper file contains functions that assist in working with -directories. +The Filesystem Helper file contains functions that assist in working with +files and directories. .. contents:: :local: From 0304689e95c3ac4dbc1d95b1b2942b3b9f07f7d7 Mon Sep 17 00:00:00 2001 From: kenjis Date: Thu, 16 Nov 2023 09:29:01 +0900 Subject: [PATCH 2/5] docs: fix incorrect parameter in sample code --- user_guide_src/source/helpers/filesystem_helper/004.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/helpers/filesystem_helper/004.php b/user_guide_src/source/helpers/filesystem_helper/004.php index 6b1e065cc0a5..418ecd7640fc 100644 --- a/user_guide_src/source/helpers/filesystem_helper/004.php +++ b/user_guide_src/source/helpers/filesystem_helper/004.php @@ -1,3 +1,3 @@ Date: Thu, 16 Nov 2023 09:30:09 +0900 Subject: [PATCH 3/5] docs: add text decration --- .../source/helpers/filesystem_helper.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/user_guide_src/source/helpers/filesystem_helper.rst b/user_guide_src/source/helpers/filesystem_helper.rst index eb70a3cc5406..728ce3997cd2 100644 --- a/user_guide_src/source/helpers/filesystem_helper.rst +++ b/user_guide_src/source/helpers/filesystem_helper.rst @@ -24,7 +24,7 @@ The following functions are available: .. php:function:: directory_map($sourceDir[, $directoryDepth = 0[, $hidden = false]]) :param string $sourceDir: Path to the source directory - :param int $directoryDepth: Depth of directories to traverse (0 = fully recursive, 1 = current dir, etc) + :param int $directoryDepth: Depth of directories to traverse (``0`` = fully recursive, ``1`` = current dir, etc) :param bool $hidden: Whether to include hidden paths :returns: An array of files :rtype: array @@ -33,17 +33,17 @@ The following functions are available: .. literalinclude:: filesystem_helper/002.php - .. note:: Paths are almost always relative to your main index.php file. + .. note:: Paths are almost always relative to your main **index.php** file. Sub-folders contained within the directory will be mapped as well. If you wish to control the recursion depth, you can do so using the second - parameter (integer). A depth of 1 will only map the top level directory: + parameter (integer). A depth of ``1`` will only map the top level directory: .. literalinclude:: filesystem_helper/003.php By default, hidden files will not be included in the returned array and hidden directories will be skipped. To override this behavior, you may - set a third parameter to true (boolean): + set a third parameter to ``true`` (boolean): .. literalinclude:: filesystem_helper/004.php @@ -99,7 +99,7 @@ The following functions are available: :param string $path: File path :param string $data: Data to write to file :param string $mode: ``fopen()`` mode - :returns: true if the write was successful, false in case of an error + :returns: ``true`` if the write was successful, ``false`` in case of an error :rtype: bool Writes data to the file specified in the path. If the file does not exist then the @@ -120,7 +120,7 @@ The following functions are available: be set such that it is writable. If the file does not already exist, then the directory containing it must be writable. - .. note:: The path is relative to your main site index.php file, NOT your + .. note:: The path is relative to your main site **index.php** file, NOT your controller or view files. CodeIgniter uses a front controller so paths are always relative to the main site index. @@ -132,7 +132,7 @@ The following functions are available: :param bool $delDir: Whether to also delete directories :param bool $htdocs: Whether to skip deleting .htaccess and index page files :param bool $hidden: Whether to also delete hidden files (files beginning with a period) - :returns: true on success, false in case of an error + :returns: ``true`` on success, ``false`` in case of an error :rtype: bool Deletes ALL files contained in the supplied path. @@ -141,7 +141,7 @@ The following functions are available: .. literalinclude:: filesystem_helper/008.php - If the second parameter is set to true, any directories contained within the supplied + If the second parameter is set to ``true``, any directories contained within the supplied root path will be deleted as well. Example: From 4ed2bfe33b8eed5ad7e1b1937fb03538aed273ef Mon Sep 17 00:00:00 2001 From: kenjis Date: Thu, 16 Nov 2023 09:30:34 +0900 Subject: [PATCH 4/5] docs: add links to PHP manual --- user_guide_src/source/helpers/filesystem_helper.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/helpers/filesystem_helper.rst b/user_guide_src/source/helpers/filesystem_helper.rst index 728ce3997cd2..99230f2d4c94 100644 --- a/user_guide_src/source/helpers/filesystem_helper.rst +++ b/user_guide_src/source/helpers/filesystem_helper.rst @@ -204,7 +204,7 @@ The following functions are available: :returns: Symbolic permissions string :rtype: string - Takes numeric permissions (such as is returned by ``fileperms()``) and returns + Takes numeric permissions (such as is returned by `fileperms() `_) and returns standard symbolic notation of file permissions. .. literalinclude:: filesystem_helper/012.php @@ -215,7 +215,7 @@ The following functions are available: :returns: Octal permissions string :rtype: string - Takes numeric permissions (such as is returned by ``fileperms()``) and returns + Takes numeric permissions (such as is returned by `fileperms() `_) and returns a three character octal notation of file permissions. .. literalinclude:: filesystem_helper/013.php From fd07f4fa870c3eba07989415f7aee4a7f815e274 Mon Sep 17 00:00:00 2001 From: kenjis Date: Thu, 16 Nov 2023 09:30:50 +0900 Subject: [PATCH 5/5] docs: change anchor text --- user_guide_src/source/helpers/filesystem_helper.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/helpers/filesystem_helper.rst b/user_guide_src/source/helpers/filesystem_helper.rst index 99230f2d4c94..e122660959c5 100644 --- a/user_guide_src/source/helpers/filesystem_helper.rst +++ b/user_guide_src/source/helpers/filesystem_helper.rst @@ -113,7 +113,7 @@ The following functions are available: .. literalinclude:: filesystem_helper/007.php - The default mode is 'wb'. Please see the `PHP user guide `_ + The default mode is ``'wb'``. Please see `fopen() `_ in the PHP manual for mode options. .. note:: In order for this function to write data to a file, its permissions must