O'Reilly logo

Mastering Joomla! 1.5 Extension and Framework Development by Chuck Lanham, James Kennard

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

File system

We normally store data in the database; however, we can also store data within the file system. Joomla! provides us with the joomla.filesystem library. This library enables us to work easily with the native file system. There are four main classes included in this library:

  • JPath
  • JFolder
  • JFile
  • JArchive

Paths

The static JPath class is integral to the library. Before we jump in, we must import the relevant library in order to use the JPath class:

jimport('joomla.filesystem.path');

The first three methods we will discuss are:

  • clean()
  • check()
  • find()

The clean() method is used to tidy up a path by removing any unnecessary directory separators and ensuring that all remaining directory separators are of the correct type for the current system. We use ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required