The POPFile Directory Structure

POPFile needs access to two kinds of files and it will try two ways to find them.

The first kind of file POPFile will have to access is the POPFile source code provided in various modules. The second kind of file is comprised by a couple of configuration/database files where options and the corpus will be stored.

Both kinds of files do not have to be in the same place. To find the two kinds of files POPFile will first try to read the environment variables POPFILE_ROOT and POPFILE_USER. The former contains a path that points to the POPFile directory in which the source code modules are stored. The latter points to per-user data, like configuration parameters and the corpus database. If the environment variables are not set, POPFile will try to find everything in the current directory.

When you are using the windows version of POPFile, everything is set up by the installer. It will install the source code modules to your “program files” directory and it will make sure that the per-user data is stored in your “application data” folder. It will also set the two environment variables to point to these two locations.

POPFile source code directories

This is the directory structure when POPFile is installed (either through the Windows installer, or by unzipping the cross-platform version).

popfile/

The root of the POPFile installation which contains the main POPFile script (popfile.pl), further source code modules, and on Windows the EXE version(s). Depending on your system settings and system language, you could, e.g., find this folder in “C:\Program Files\” on Windows.

This directory has the following sub-directories:

popfile/Classifier/
popfile/kakasi/     (on Windows, if support for Japanese processing was installed)
popfile/languages/
popfile/lib/        (on Windows, used for the minimal Perl system)
popfile/Platform/   (on Windows)
popfile/POPFile/
popfile/Proxy/
popfile/Services/
popfile/skins/
popfile/UI/

POPFile directories for per-user data

On recent versions of Windows (XP and 2000 for sure), you will usually find another “POPFile” directory in the folder where your system stores “Application Data”. The exact location of this directory heavily depends on the version, language, and configuration of your windows system and whether or not you accepted the default location suggested by the installer or 'Add POPFile User' wizard.

The Windows installer and its 'Add POPFile User' wizard make it very easy to select a different location from the default one, and even if the default locations are used it can be difficult to find the relevant folder so the PFI Diagnostic utility has been created to avoid the need to delve into the registry. The utility displays the location of the POPFile program and the location of the 'User Data'.

The Windows installer installs the PFI Diagnostic utility when it installs POPFile and creates some Start Menu shortcuts for the utility. The utility can do more than just display the location of the per-user data (see the utility's HOWTO page for further details).

On Windows XP the 'User Data' may be in: C:\Documents and Settings\User Name\Application Data\POPFile. The Application Data folder is normally a hidden folder, if it is hidden, it is still easily accessed by typing the location into the address bar in Explorer.

This directory usually has at least one subdirectory (messages):

backup/     (on Windows, if installer/'Add POPFile User' found an old corpus)
messages/

which will contain the messages that POPFile presents to you when you access the history. Normally messages are only stored here for 2 days and then automatically deleted by POPFile (you can use the Configuration page in the UI to change the number of days for which messages will be kept)

On the same level as the messages directory, you will find several files. The most important ones are:

popfile.cfg
popfile.db
stopwords

In this folder POPFile also creates temporary (journal) files and log files. The journal file will be created when POPFile is about to update its database file. If POPFile can't create the journal file (e.g. when you don't have permission to create files in the folder), you'll see the 'unable to open database file' error.

popfile.db-journal    (The temporary (journal) file)
popfileXXXXXXXXXX.log (The log files)

For more information about the log files, please see FAQ.

SVN Structure

The engine module has the following directory structure:

popfile/engine/


popfile/engine/Classifier/
popfile/engine/Devel/
popfile/engine/languages/
popfile/engine/Platform/
popfile/engine/POPFile/
popfile/engine/Proxy/
popfile/engine/Services/
popfile/engine/skins/
popfile/engine/Test/
popfile/engine/tests
popfile/engine/UI/

The windows module contains the directories:

popfile/windows/

popfile/windows/languages/
popfile/windows/POPFileIcon/
popfile/windows/test/

popfile/windows/UI/

popfile/windows/install/ (no longer used - waiting for SourceForge to delete this)

The files in the “popfile/windows” directory and its subdirectories are only used when building the Windows installer and some of the Windows EXE programs. The popfile.ico file in the popfile/windows/POPFileIcon/ directory is also used when building the Perl-based Windows EXE files (see the “Makefile” in the “popfile/engine/” directory).


This probably should go on another page, but for now its here. I moved it over from an obsolete/redundant Directory Structure Page.

notes on popfile.cfg:

    directory (folder) names must be short-name format, 
    presence/abcense of trailing slashes must be observed per the above example,
    windows style back-slashes must be converted to unix style forward slashes
 
directorystructure.txt · Last modified: 2009/05/26 14:58 by 127.0.0.1

Should you find anything in the documentation that is incomplete, unclear, outdated or just plain wrong, please let us know and leave a note in the Documentation Forum.

Recent changes RSS feed Donate Driven by DokuWiki
The content of this wiki is protected by the GNU Fee Documentation License