summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Lima <rafael.palma.lima@gmail.com>2021-05-13 01:00:26 +0200
committerAlain Romedenne <alain.romedenne@libreoffice.org>2021-05-20 18:24:15 +0200
commitbd3e4888b2b47d022871218f210b290b7d046288 (patch)
tree6a5d17930d8c27f9f3dc576924bade1613ed9f8d
parent6eca503da7d03e8446f2ea9477fd6cdca735f6f1 (diff)
Related tdf#128784 X-ref ChDir, ChDrive and CurDir with SF_FileSystem
The Basic functions ChDir, ChDrive and CurDir are DOS-specific and have limited functionality. Hence, it's important to introduce the FileSystem service (from ScriptForge) for users that wish to write scripts that need to handle folders and files. Change-Id: I33e24669083887b540cf44711ec5114e6ae5c521 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/115513 Tested-by: Jenkins Reviewed-by: Alain Romedenne <alain.romedenne@libreoffice.org>
-rw-r--r--source/text/sbasic/shared/03020000.xhp25
-rw-r--r--source/text/sbasic/shared/03020401.xhp32
-rw-r--r--source/text/sbasic/shared/03020402.xhp17
-rw-r--r--source/text/sbasic/shared/03020403.xhp27
4 files changed, 62 insertions, 39 deletions
diff --git a/source/text/sbasic/shared/03020000.xhp b/source/text/sbasic/shared/03020000.xhp
index 38336c7fae..e036d774fb 100644
--- a/source/text/sbasic/shared/03020000.xhp
+++ b/source/text/sbasic/shared/03020000.xhp
@@ -18,25 +18,30 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
-
+
<helpdocument version="1.0">
<meta>
-<topic id="textsbasicshared03020000xml" indexer="include" status="PUBLISH">
-<title id="tit" xml-lang="en-US">File I/O Functions</title>
-<filename>/text/sbasic/shared/03020000.xhp</filename>
-</topic>
-<history>
-<created date="2003-10-31T00:00:00">Sun Microsystems, Inc.</created>
-</history>
+ <topic id="textsbasicshared03020000xml" indexer="include" status="PUBLISH">
+ <title id="tit" xml-lang="en-US">File I/O Functions</title>
+ <filename>/text/sbasic/shared/03020000.xhp</filename>
+ </topic>
+ <history>
+ <created date="2003-10-31T00:00:00">Sun Microsystems, Inc.</created>
+ </history>
</meta>
<body>
<section id="file_IO">
-<paragraph role="heading" id="hd_id3156344" xml-lang="en-US" level="1"><link href="text/sbasic/shared/03020000.xhp" name="File I/O Functions">File I/O Functions</link></paragraph>
-<paragraph role="paragraph" id="par_id3153360" xml-lang="en-US">Use File I/O functions to create and manage user-defined (data) files.</paragraph>
+ <paragraph role="heading" id="hd_id3156344" xml-lang="en-US" level="1"><link href="text/sbasic/shared/03020000.xhp" name="File I/O Functions">File I/O Functions</link></paragraph>
+ <paragraph role="paragraph" id="par_id3153360" xml-lang="en-US">Use File I/O functions to create and manage user-defined (data) files.</paragraph>
</section>
<paragraph role="paragraph" id="par_id3150398" xml-lang="en-US">You can use these functions to support the creation of "relative" files, so that you can save and reload certain records by specifying their record number. File I/O functions can also help you manage your files by providing you with information such as file size, current path settings, or the creation date of a file or a directory.</paragraph>
+<embed href="text/sbasic/shared/03020401.xhp#SF_FileSystem_Note"/>
<embed href="text/sbasic/shared/03020100.xhp#opening"/>
<embed href="text/sbasic/shared/03020200.xhp#file_IO"/>
<embed href="text/sbasic/shared/03020400.xhp#organisation"/>
+<section id="relatedtopics">
+ <embed href="text/sbasic/shared/03/sf_filesystem.xhp#FileSystemService"/>
+ <embed href="text/sbasic/shared/03/sf_textstream.xhp#TextStreamService"/>
+</section>
</body>
</helpdocument>
diff --git a/source/text/sbasic/shared/03020401.xhp b/source/text/sbasic/shared/03020401.xhp
index 220fb4d8d7..42f721d4d5 100644
--- a/source/text/sbasic/shared/03020401.xhp
+++ b/source/text/sbasic/shared/03020401.xhp
@@ -37,7 +37,11 @@
</section>
<section id="deprecated_inStarOffice7">
-<warning id="par_id461605879610611" xml-lang="en-US">Some DOS-specific file and directory functions are no longer provided in %PRODUCTNAME, or their function is only limited. For example, support for the <literal>ChDir</literal>, <literal>ChDrive</literal> and <literal>CurDir</literal> functions is not provided. Some DOS-specific properties are no longer used in functions that expect file properties as parameters (for example, to differentiate from concealed files and system files). This ensures the greatest possible level of platform independence for %PRODUCTNAME. Therefore this feature is subject to removal in a future release.</warning>
+ <warning id="par_id461605879610611" xml-lang="en-US">Some DOS-specific file and directory functions are no longer provided in %PRODUCTNAME, or their function is only limited. For example, support for the <literal>ChDir</literal>, <literal>ChDrive</literal> and <literal>CurDir</literal> functions is not provided. Some DOS-specific properties are no longer used in functions that expect file properties as parameters (for example, to differentiate from concealed files and system files). This ensures the greatest possible level of platform independence for %PRODUCTNAME. Therefore this feature is subject to removal in a future release.</warning>
+</section>
+
+<section id="SF_FileSystem_Note">
+ <note id="par_id321620859565917">The <link href="text/sbasic/shared/03/lib_ScriptForge.xhp" name="SF_Lib">ScriptForge</link> library in %PRODUCTNAME 7.1 introduces the <link href="text/sbasic/shared/03/sf_filesystem.xhp" name="FileSystem_Service">FileSystem</link> service with methods to handle files and folders in user scripts.</note>
</section>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
@@ -51,19 +55,23 @@
<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
<embed href="text/sbasic/shared/00000003.xhp#err5"/>
<embed href="text/sbasic/shared/00000003.xhp#err76"/>
-
+
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
-<paragraph id="par_idm1341266032" role="bascode" localize="false">Sub ExampleChDir</paragraph>
-<paragraph id="par_idm1341264800" role="bascode" localize="false">Dim sDir1 As String , sDir2 As String</paragraph>
-<paragraph id="par_idm1341263552" role="bascode" localize="false"> sDir1 = "c:\Test"</paragraph>
-<paragraph id="par_idm1341262320" role="bascode" localize="false"> sDir2 = "d:\Private"</paragraph>
-<paragraph id="par_idm1341261072" role="bascode" localize="false"> ChDir( sDir1 )</paragraph>
-<paragraph id="par_idm1341259840" role="bascode" localize="false"> MsgBox CurDir</paragraph>
-<paragraph id="par_idm1341258608" role="bascode" localize="false"> ChDir( sDir2 )</paragraph>
-<paragraph id="par_idm1341257376" role="bascode" localize="false"> MsgBox CurDir</paragraph>
-<paragraph id="par_idm1341256144" role="bascode" localize="false">End Sub</paragraph>
+ <paragraph id="par_idm1341266032" role="bascode" localize="false">Sub ExampleChDir</paragraph>
+ <paragraph id="par_idm1341264800" role="bascode" localize="false"> Dim sDir1 As String, sDir2 As String</paragraph>
+ <paragraph id="par_idm1341263552" role="bascode" localize="false"> sDir1 = "C:\Test"</paragraph>
+ <paragraph id="par_idm1341262320" role="bascode" localize="false"> sDir2 = "D:\Private"</paragraph>
+ <paragraph id="par_idm1341261072" role="bascode" localize="false"> ChDir( sDir1 )</paragraph>
+ <paragraph id="par_idm1341259840" role="bascode" localize="false"> MsgBox CurDir</paragraph>
+ <paragraph id="par_idm1341258608" role="bascode" localize="false"> ChDir( sDir2 )</paragraph>
+ <paragraph id="par_idm1341257376" role="bascode" localize="false"> MsgBox CurDir</paragraph>
+ <paragraph id="par_idm1341256144" role="bascode" localize="false">End Sub</paragraph>
</bascode>
-</body>
+<section id="relatedtopics">
+ <embed href="text/sbasic/shared/03/sf_filesystem.xhp#FileSystemService"/>
+ <embed href="text/sbasic/shared/03/sf_textstream.xhp#TextStreamService"/>
+</section>
+</body>
</helpdocument>
diff --git a/source/text/sbasic/shared/03020402.xhp b/source/text/sbasic/shared/03020402.xhp
index 59f89e0557..780f9e204c 100644
--- a/source/text/sbasic/shared/03020402.xhp
+++ b/source/text/sbasic/shared/03020402.xhp
@@ -36,10 +36,11 @@
<paragraph id="par_id3149656" role="paragraph" xml-lang="en-US">Changes the current drive.</paragraph>
</section>
<embed href="text/sbasic/shared/03020401.xhp#deprecated_inStarOffice7"/>
+<embed href="text/sbasic/shared/03020401.xhp#SF_FileSystem_Note"/>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<bascode>
-<paragraph id="par_id3154685" role="bascode" xml-lang="en-US">ChDrive Text As String</paragraph>
+ <paragraph id="par_id3154685" role="bascode" localize="false" xml-lang="en-US">ChDrive Text As String</paragraph>
</bascode>
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
@@ -52,10 +53,14 @@
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
-<paragraph id="par_idm1340928496" role="bascode" localize="false" xml-lang="en-US">Sub ExampleChDrive</paragraph>
-<paragraph id="par_id3152576" role="bascode" xml-lang="en-US"> ChDrive "D" ' Only possible if a drive 'D' exists.</paragraph>
-<paragraph id="par_idm1340925472" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph>
+ <paragraph id="par_idm1340928496" role="bascode" localize="false" xml-lang="en-US">Sub ExampleChDrive</paragraph>
+ <paragraph id="par_id3152576" role="bascode" xml-lang="en-US"> ChDrive "D" ' Only possible if a drive 'D' exists.</paragraph>
+ <paragraph id="par_idm1340925472" role="bascode" localize="false" xml-lang="en-US">End Sub</paragraph>
</bascode>
-</body>
-</helpdocument> \ No newline at end of file
+<section id="relatedtopics">
+ <embed href="text/sbasic/shared/03/sf_filesystem.xhp#FileSystemService"/>
+ <embed href="text/sbasic/shared/03/sf_textstream.xhp#TextStreamService"/>
+</section>
+</body>
+</helpdocument>
diff --git a/source/text/sbasic/shared/03020403.xhp b/source/text/sbasic/shared/03020403.xhp
index af7c1b381f..0929218d7c 100644
--- a/source/text/sbasic/shared/03020403.xhp
+++ b/source/text/sbasic/shared/03020403.xhp
@@ -36,6 +36,7 @@
<paragraph id="par_id3156343" role="paragraph" xml-lang="en-US">Returns a variant string that represents the current path <switchinline select="sys"><caseinline select="WIN">or that of the specified Windows drive</caseinline></switchinline>.</paragraph>
</section>
<embed href="text/sbasic/shared/03020401.xhp#deprecated_inStarOffice7"/>
+<embed href="text/sbasic/shared/03020401.xhp#SF_FileSystem_Note"/>
<embed href="text/sbasic/shared/00000003.xhp#functsyntax"/>
<bascode>
@@ -48,7 +49,7 @@
<embed href="text/sbasic/shared/00000003.xhp#functparameters"/>
<paragraph id="par_id3153193" role="paragraph" xml-lang="en-US"> <emph>Text:</emph> Any string expression that specifies an existing drive, for example "C" for the first partition of the first hard drive. This parameter is used solely under Windows.</paragraph>
<paragraph id="par_id3155133" role="paragraph" xml-lang="en-US">If no drive is specified or if the drive is a zero-length string (""), <literal>CurDir</literal> returns the path for the current drive. %PRODUCTNAME Basic reports an error if the syntax of the drive description is incorrect or if the drive does not exist.</paragraph>
-
+
<paragraph id="par_id3150010" role="paragraph" xml-lang="en-US">This function is not case-sensitive.</paragraph>
<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
<embed href="text/sbasic/shared/00000003.xhp#err5"/>
@@ -58,16 +59,20 @@
<embed href="text/sbasic/shared/00000003.xhp#functexample"/>
<bascode>
-<paragraph id="par_idm1341570656" role="bascode" localize="false">Sub ExampleCurDir</paragraph>
-<paragraph id="par_idm1341569424" role="bascode" localize="false">Dim sDir1 As String , sDir2 As String</paragraph>
-<paragraph id="par_idm1341568176" role="bascode" localize="false"> sDir1 = "c:\Test"</paragraph>
-<paragraph id="par_idm1341566944" role="bascode" localize="false"> sDir2 = "d:\Private"</paragraph>
-<paragraph id="par_idm1341565696" role="bascode" localize="false"> ChDir( sDir1 )</paragraph>
-<paragraph id="par_idm1341564464" role="bascode" localize="false"> MsgBox CurDir</paragraph>
-<paragraph id="par_idm1341563232" role="bascode" localize="false"> ChDir( sDir2 )</paragraph>
-<paragraph id="par_idm1341562000" role="bascode" localize="false"> MsgBox CurDir</paragraph>
-<paragraph id="par_idm1341560768" role="bascode" localize="false">End Sub</paragraph>
+ <paragraph id="par_idm1341570656" role="bascode" localize="false">Sub ExampleCurDir</paragraph>
+ <paragraph id="par_idm1341569424" role="bascode" localize="false"> Dim sDir1 As String, sDir2 As String</paragraph>
+ <paragraph id="par_idm1341568176" role="bascode" localize="false"> sDir1 = "C:\Test"</paragraph>
+ <paragraph id="par_idm1341566944" role="bascode" localize="false"> sDir2 = "D:\Private"</paragraph>
+ <paragraph id="par_idm1341565696" role="bascode" localize="false"> ChDir( sDir1 )</paragraph>
+ <paragraph id="par_idm1341564464" role="bascode" localize="false"> MsgBox CurDir</paragraph>
+ <paragraph id="par_idm1341563232" role="bascode" localize="false"> ChDir( sDir2 )</paragraph>
+ <paragraph id="par_idm1341562000" role="bascode" localize="false"> MsgBox CurDir</paragraph>
+ <paragraph id="par_idm1341560768" role="bascode" localize="false">End Sub</paragraph>
</bascode>
+<section id="relatedtopics">
+ <embed href="text/sbasic/shared/03/sf_filesystem.xhp#FileSystemService"/>
+ <embed href="text/sbasic/shared/03/sf_textstream.xhp#TextStreamService"/>
+</section>
</body>
-</helpdocument> \ No newline at end of file
+</helpdocument>