<?xml version="1.0" encoding="utf-8"?>
<ManualTopic ID="/baanerp/da/onlinemanual/000051" xml:lang="en">
	<Header>
		<Title xmlns:HTML="http://www.w3.org/TR/REC-html40">dadllfile_path</Title>
	</Header>
	<GeneralSection><GeneralSection><SectionTitle>Usage Description</SectionTitle>
			<Paragraph class="Default">This library contains functions to handle files and paths like expanding for the #-character, constructing paths, and so on.</Paragraph>
			<Paragraph class="Default">Limitation: the functions in this library currently cannot handle drive names, like \\server\data\file.</Paragraph>
		</GeneralSection>
		<GeneralSection><SectionTitle>DLL Prototypes</SectionTitle>
			<Formula space-and-orientation="indented-estimated"><Paragraph class="Default"> function extern long check.and.create.dir(
                const string path() )
 pre   : not isspace(path) post  : the path &lt;path&gt; will be created if not
already existing return: whether the path &lt;path&gt; exists (or could be created)
desc  : if necessary this function also creates subdirectories
        ${&lt;env_var&gt;} can be used but no subdirectories in the
        ${&lt;env_var&gt;} are tested).
 function extern string expand.path(
                const string path(),
                [ long comp ] )
 pre   : path (not necessarily stripped) post  : path (stripped) with all
#-characters replaced by the company
        number comp (or the current company if not provided).
 function extern string get.full.file(
                const string path(),
                const string file() )
 pre   : parameters don't have to be stripped return: the full file name desc  :
this function tries to concatenate path and file into a full
        file name defined as: path/file
        This will only be done if:
        - both path and file are not empty
        - file itself is not an absolute path (beginning with / or $)
        Otherwise just file will be returned.
 function extern string get.log.filename(
                domain daxch.txch xch.type,
                const domain daxch.cxch xch.scheme,
                const domain daxch.cbat batch,
                long run.num,
                domain daxch.pint try.num,
                const string seq.path(),
                [ long comp ] )
 pre   : parameters do not have to be stripped return: the full file name where
the logfile is to be located:
        -regular import:

&lt;seq.path&gt;/&lt;xch.scheme&gt;.&lt;run.num&gt;.i/log.&lt;batch&gt;.&lt;run.num&gt;.&lt;try.num&gt;
        -non-regular import: &lt;seq.path&gt;/log.&lt;batch&gt;.&lt;run.num&gt;.&lt;try.num&gt;
        -regular export:

&lt;seq.path&gt;/&lt;xch.scheme&gt;.&lt;run.num&gt;.e/exp.&lt;batch&gt;.&lt;run.num&gt;.&lt;try.num&gt;
        -non-regular export: &lt;seq.path&gt;/exp.&lt;batch&gt;.&lt;run.num&gt;.&lt;try.num&gt;
 function extern string get.object.path(
                const domain daxch.cxch xch.scheme,
                [ long comp ] )
 pre   : true return: the path where objects (and error files) should be stored.
        empty if xch.scheme does not exist
 function extern get.path.filename(
                const string full.path(),
                ref string path.name(),
                ref string file.name() )
 pre   : true post  : &lt;full.path&gt; is split into the path part (in &lt;path.name&gt;)
        and the file name part (in &lt;file.name&gt;)
 function extern string get.seq.filename(
                domain daxch.txch xch.type,
                const domain daxch.cxch xch.scheme,
                long run.num,
                const string seq.path(),
                const string sub.dir(),
                const string seq.file(),
                [ long comp ] )
 pre   : parameters do not have to be stripped return: the full file name where
an exchange file is (to be) located
        (with # expanded with the company number):
        -regular export and isspace(sub.dir):
         &lt;seq.path&gt;/&lt;xch.scheme&gt;.&lt;run.num&gt;.e/&lt;seq.file&gt;
        -regular export and not isspace(sub.dir):
         &lt;seq.path&gt;/&lt;sub.dir&gt;.&lt;run.num&gt;/&lt;seq.file&gt;
        -regular import and isspace(sub.dir):
         &lt;seq.path&gt;/&lt;xch.scheme&gt;.&lt;run.num&gt;.i/&lt;seq.file&gt;
        -regular import and not isspace(sub.dir):
         &lt;seq.path&gt;/&lt;sub.dir&gt;.&lt;run.num&gt;/&lt;seq.file&gt;
        -non-regular   :
        -&lt;seq.path&gt;/&lt;seq.file&gt;
        but if seq.file is a pathname in itself (starts with a $ or /)
        then &lt;seq.file&gt;
 function extern long path.exists(
                const domain daxch.path path )
 pre   : true return: whether the directory &lt;path.name&gt; exists
</Paragraph>
			</Formula>
		</GeneralSection>
	</GeneralSection>
	<RelatedTopics><SectionTitle>
                              Related topics
                           </SectionTitle>
		<RelTopic><Link href="/baanerp/da/onlinemanual/000102" role="manual">Libraries</Link>
		</RelTopic>
	</RelatedTopics>
</ManualTopic>
