<!--
   $FML: directory.sgml,v 1.3 2005/09/25 04:27:18 fukachan Exp $
-->


<chapter id="directory">
	<title>
	Directory
	</title>


<sect1 id="directory.subdir.hier.level">
	<title>
	Q: How Recursively Sub Directory Can Be Created ?
	</title>

<para>
The structore holding the html-ized article is as follows:
<screen>
200201/msg\d+.html
</screen>
</para>

<para>
One sub-directory by default.
</para>

<para>
Consider directory listing.
"ls" returns 1000 files soon, but 10000 files a little slowly.
</para>

<para>
To accelerate listing, we should use sub-directory structure.
For example, each sub-directory holds 1000 files.
The structure such as "spool/sub/file" holds 10^6 ( million ) files 
and
listing of it is fast.
</para>

<para>
It must be enough to assume that 1 million articles for one ML.
</para>

</sect1>


<sect1 id="directory.recipes">
	<title>
	Recipes
	</title>

<qandaset>

<qandaentry>

<question>
<para>
Where directory names are defined ?
</para>
</question>

<answer>
<para>
There are default definitiions at 
/usr/local/etc/fml/defaults/$VERSION/default_config.cf file.
Each config.cf of each ML overloads them.
Use fmlconf command to show the current value.
<screen>

% fmlconf $ml_name | grep _dir

</screen>
You can extract values from config object in a hook.
<screen>

$_xxx_hook = q{
	my $config = $curproc->config();
	my $xxxdir = $config->{ some_where_dir };

	... snip ...
}

</screen>

</para>
</answer>

</qandaentry>

</qandaset>

</sect1>

</chapter>
