Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

TutsPlus.com:
How to Use the Symfony Filesystem Component
Aug 29, 2018 @ 16:02:44

The TutsPlus.com site has posted another tutorial spotlighting a component of the Symfony framework. In this latest tutorial they cover the Symfony Filesystem component, a module that provides useful wrapper functionality for common file system-related needs.

In this article, we're going to explore the Symfony Filesystem component, which provides useful methods to interact with a file system. After installation and configuration, we'll create a few real-world examples of how to use it.

The tutorial starts with a brief introduction of the component including a listing of functionality it provides. It then moves on to the installation (via Composer) and use in some sample code. From there they show how to use it to:

  • create a new directory
  • create a new file and add contents
  • copy a directory
  • remove a directory

Each of these includes both a code example and a brief summary of what's happening.

tagged: tutorial symfony filesystem component

Link: https://code.tutsplus.com/tutorials/how-to-use-the-symfony-filesystem-component--cms-31664


Trending Topics: