Docs: LCL, LazUtils. Updates topic content.

* docs/xml/lazutils/lazfileutils.xml
Expands content in ResolveDots.

* docs/xml/lcl/dialogs.xml
Updates wording in InputQuery.
This commit is contained in:
dsiders 2021-08-23 15:53:15 +01:00
parent 6df7e87568
commit 06a60b60b6
2 changed files with 42 additions and 11 deletions

View File

@ -768,19 +768,48 @@ D:\db\employee.fdb
<element name="ResolveDots">
<short>
Removes duplicate path delimiters and resolves relative path symbols.
Resolves relative path references and removes duplicate path delimiters.
</short>
<descr>
<p>
This function shortens duplicate path delimiters to single path delimiters. It resolves 'A/../B' to 'B', which might be wrong under Unix if A is a symlink. The function does not check the local file system. The single dot './A' is resolved to 'A', but a single '.' is retained.
</p>
<var>ResolveDots</var> is a <var>String</var> function used to convert relative path information in <var>AFilename</var> to an absolute path reference. A relative path includes characters like '.' (for current directory - not a file name extension) and '..' (parent directory). Duplicate path limiters ('\\' for Windows) ('//' for UNIX-like environments) are converted to a single instance of the <var>PathDelimiter</var> defined for the platform.
</p>
<p>
For Windows platforms, drive letter designations and delimiters like 'C:' are recognized. A path starting with the UNC naming convention ('\\?\') is not resolved in the method.
</p>
<p>
Windows-specific file system quirks handled in the routine include:
</p>
<dl>
<dt>C:..</dt>
<dd>Not resolved, it is copied.</dd>
<dt>C:\..</dt>
<dd>Resolved to C:\</dd>
<dt>\\..</dt>
<dd>Resolved to \\</dd>
</dl>
<p>
For UNIX-like environments, the resolved path may be invalid if it references the parent directory and the initial directory in the path is a symbolic link.
</p>
<p>
When AFilename ends with a relative path ('/.' or '/..'), an additional path delimiter is added to the return value.
</p>
<p>
If a relative path reference cannot be resolved for the local file system, the original path information is retained.
</p>
<p>
Macros found in the AFilename are retained if the relative path references a parent directory. For example:
</p>
<code>
'($LazarusDir)/../path/that/may/be/invalid/for/macro/filename.ext'
</code>
</descr>
</element>
<element name="ResolveDots.Result">
<short>File name with duplicate delimiters and relative paths resolved.</short>
<short>File name with relative paths expanded and duplicate delimiters removed.</short>
</element>
<element name="ResolveDots.AFilename">
<short>File name examined in the routine.</short>
<short>Qualified file name examined in the routine.</short>
</element>
<element name="CleanAndExpandFilename">

View File

@ -4253,7 +4253,7 @@ end;
</short>
</element>
<element name="InputBox.ACaption">
<short>The caption for the dialogbox.</short>
<short>The caption for the dialog box.</short>
</element>
<element name="InputBox.APrompt">
<short>The text asking the user for his input.</short>
@ -4453,22 +4453,24 @@ end;
</descr>
</element>
<element name="InputQuery.ACaption">
<short>The caption for the dialogbox.</short>
<short>The caption for the dialog box.</short>
</element>
<element name="InputQuery.APrompt">
<short>The text asking the user for his input.</short>
<short>The text label displayed for the edit control on the dialog box.</short>
</element>
<element name="InputQuery.MaskInput">
<short>Determines if the dialog shows *s or the actual input.</short>
<short>Determines if the dialog shows * characters instead of the actual input.</short>
<descr>
Set MaskInput to true if you want to hide the input and display asterisks.
</descr>
</element>
<element name="InputQuery.Value">
<short>The value the user entered.</short>
<short>
The initial value(s) displayed, and the modified value(s) returned from the dialog box.
</short>
<descr>
<p>
When the DialogBox is shown the text in the edit control will be Value. This string can be altered or amended by the user. When ENTER is pressed or OK clicked, Value will contain the edited text from the dialog.
<var>Value</var> is a variable parameter used to pass the initial value(s) displayed in the dialog box. The overloaded variants allow Value to be specified using either a <var>String</var> or an <var>Array of String</var> type. Value is where the modified content from the dialog box is returned when the <b>ENTER</b> key is pressed or the <b>OK</b> button is clicked.
</p>
</descr>
</element>