From ac82913b7ab0b1e7ff8f14c7fa6b3fa1111f321d Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 24 Jul 2024 10:11:48 +0900 Subject: [PATCH 1/4] docs: remove ` Date: Wed, 24 Jul 2024 10:12:26 +0900 Subject: [PATCH 2/4] docs: remove "uploaded" The File class is not only for uploaded files. --- user_guide_src/source/libraries/files.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/libraries/files.rst b/user_guide_src/source/libraries/files.rst index b4c69e6c0177..b0e832b78e7d 100644 --- a/user_guide_src/source/libraries/files.rst +++ b/user_guide_src/source/libraries/files.rst @@ -45,7 +45,7 @@ method. This is especially useful to rename files when moving it so that the fil getSize() ========= -Returns the size of the uploaded file in bytes: +Returns the size of the file in bytes: .. literalinclude:: files/004.php :lines: 2- @@ -53,7 +53,7 @@ Returns the size of the uploaded file in bytes: getSizeByUnit() =============== -Returns the size of the uploaded file default in bytes. You can pass in either 'kb' or 'mb' as the first parameter to get +Returns the size of the file default in bytes. You can pass in either ``'kb'`` or ``'mb'`` as the first parameter to get the results in kilobytes or megabytes, respectively: .. literalinclude:: files/005.php From f44e97c166c4c0f5fc80ecf482f3fceca79040df Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 24 Jul 2024 10:13:15 +0900 Subject: [PATCH 3/4] docs: decorate method name --- user_guide_src/source/libraries/files.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_guide_src/source/libraries/files.rst b/user_guide_src/source/libraries/files.rst index b0e832b78e7d..89bfd13ab550 100644 --- a/user_guide_src/source/libraries/files.rst +++ b/user_guide_src/source/libraries/files.rst @@ -92,7 +92,7 @@ By default, the original filename was used. You can specify a new filename by pa .. literalinclude:: files/009.php :lines: 2- -The move() method returns a new File instance that for the relocated file, so you must capture the result if the +The ``move()`` method returns a new File instance that for the relocated file, so you must capture the result if the resulting location is needed: .. literalinclude:: files/010.php From 5340d8d59979d90f2074c0fc9be0a63233958946 Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 24 Jul 2024 10:13:56 +0900 Subject: [PATCH 4/4] docs: move sentence down --- user_guide_src/source/libraries/files.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/user_guide_src/source/libraries/files.rst b/user_guide_src/source/libraries/files.rst index 89bfd13ab550..8594fd8156c5 100644 --- a/user_guide_src/source/libraries/files.rst +++ b/user_guide_src/source/libraries/files.rst @@ -14,12 +14,13 @@ Getting a File instance *********************** You create a new File instance by passing in the path to the file in the constructor. -By default, the file does not need to exist. However, you can pass an additional argument of "true" -to check that the file exists and throw ``FileNotFoundException()`` if it does not. .. literalinclude:: files/001.php :lines: 2- +By default, the file does not need to exist. However, you can pass an additional argument of ``true`` +to check that the file exists and throw ``FileNotFoundException()`` if it does not. + Taking Advantage of Spl ***********************