Skip to content

Commit 304de64

Browse files
committed
Minor tweaks
1 parent 44fd61e commit 304de64

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

components/filesystem.rst

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
The Filesystem Component
55
========================
66

7-
The Filesystem component provides basic utilities for the filesystem and
8-
paths manipulation.
7+
The Filesystem component provides platform-independent utilities for
8+
filesystem operations and for file/directory paths manipulation.
99

1010
Installation
1111
------------
@@ -19,12 +19,8 @@ Installation
1919
Usage
2020
-----
2121

22-
The component contains two classes:
23-
24-
- The :class:`Symfony\\Component\\Filesystem\\Filesystem` which provides utilities
25-
for filesystem write operations.
26-
- The :class:`Symfony\\Component\\Filesystem\\Path` which provides utilities
27-
for paths manipulation.::
22+
The component contains two main classes called :class:`Symfony\\Component\\Filesystem\\Filesystem`
23+
and :class:`Symfony\\Component\\Filesystem\\Path`::
2824

2925
use Symfony\Component\Filesystem\Exception\IOExceptionInterface;
3026
use Symfony\Component\Filesystem\Filesystem;
@@ -40,8 +36,8 @@ The component contains two classes:
4036
echo "An error occurred while creating your directory at ".$exception->getPath();
4137
}
4238

43-
Filesystem
44-
----------
39+
Filesystem Utilities
40+
--------------------
4541

4642
``mkdir``
4743
~~~~~~~~~
@@ -325,22 +321,21 @@ creates them before appending the contents.
325321

326322
The third argument of ``appendToFile()`` was introduced in Symfony 5.4.
327323

328-
Path
329-
----
324+
Path Manipulation Utilities
325+
---------------------------
330326

331327
.. versionadded:: 5.4
332328

333329
The :class:`Symfony\\Component\\Filesystem\\Path` class was introduced in Symfony 5.4.
334330

335331
Dealing with file paths usually involves some difficulties:
336332

337-
- System Heterogeneity: file paths look different on different platforms. UNIX
333+
- Platform differences: file paths look different on different platforms. UNIX
338334
file paths start with a slash ("/"), while Windows file paths start with a
339335
system drive ("C:"). UNIX uses forward slashes, while Windows uses backslashes
340-
by default ("").
336+
by default.
341337
- Absolute/relative paths: web applications frequently need to deal with absolute
342-
and relative paths. Converting one to the other properly is tricky and
343-
repetitive.
338+
and relative paths. Converting one to the other properly is tricky and repetitive.
344339

345340
:class:`Symfony\\Component\\Filesystem\\Path` provides utility methods to tackle
346341
those issues.
@@ -509,7 +504,6 @@ to obtain the root of a path::
509504

510505
echo Path::getRoot("C:\Programs\Apache\Config");
511506
// => C:/
512-
>>>>>>> a992f6342 ([Filesystem] Add documentation for the Path class)
513507

514508
Error Handling
515509
--------------

0 commit comments

Comments
 (0)