03020404.xhp (8b0727e7) 03020404.xhp (23444184)
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--***********************************************************
4 *
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements. See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership. The ASF licenses this file

--- 30 unchanged lines hidden (view full) ---

39<paragraph role="heading" id="hd_id3154365" xml-lang="en-US" level="2" l10n="U" oldref="3">Syntax:</paragraph>
40<paragraph role="code" id="par_id3156282" xml-lang="en-US" l10n="U" oldref="4">Dir [(Text As String) [, Attrib As Integer]]</paragraph>
41<paragraph role="heading" id="hd_id3156424" xml-lang="en-US" level="2" l10n="U" oldref="5">Return value:</paragraph>
42<paragraph role="paragraph" id="par_id3153193" xml-lang="en-US" l10n="U" oldref="6">String</paragraph>
43<paragraph role="heading" id="hd_id3153770" xml-lang="en-US" level="2" l10n="U" oldref="7">Parameters:</paragraph>
44<paragraph role="paragraph" id="par_id3161831" xml-lang="en-US" l10n="U" oldref="8">
45<emph>Text:</emph> Any string expression that specifies the search path, directory or file. This argument can only be specified the first time that you call the Dir function. If you want, you can enter the path in <link href="text/sbasic/shared/00000002.xhp" name="URL notation">URL notation</link>.</paragraph>
46<paragraph role="paragraph" id="par_id3146974" xml-lang="en-US" l10n="U" oldref="9">
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--***********************************************************
4 *
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements. See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership. The ASF licenses this file

--- 30 unchanged lines hidden (view full) ---

39<paragraph role="heading" id="hd_id3154365" xml-lang="en-US" level="2" l10n="U" oldref="3">Syntax:</paragraph>
40<paragraph role="code" id="par_id3156282" xml-lang="en-US" l10n="U" oldref="4">Dir [(Text As String) [, Attrib As Integer]]</paragraph>
41<paragraph role="heading" id="hd_id3156424" xml-lang="en-US" level="2" l10n="U" oldref="5">Return value:</paragraph>
42<paragraph role="paragraph" id="par_id3153193" xml-lang="en-US" l10n="U" oldref="6">String</paragraph>
43<paragraph role="heading" id="hd_id3153770" xml-lang="en-US" level="2" l10n="U" oldref="7">Parameters:</paragraph>
44<paragraph role="paragraph" id="par_id3161831" xml-lang="en-US" l10n="U" oldref="8">
45<emph>Text:</emph> Any string expression that specifies the search path, directory or file. This argument can only be specified the first time that you call the Dir function. If you want, you can enter the path in <link href="text/sbasic/shared/00000002.xhp" name="URL notation">URL notation</link>.</paragraph>
46<paragraph role="paragraph" id="par_id3146974" xml-lang="en-US" l10n="U" oldref="9">
47<emph>Attrib: </emph>Any integer expression that specifies bitwise file attributes. The Dir function only returns files or directories that match the specified attributes. You can combine several attributes by adding the attribute values:</paragraph>
47<emph>Attrib:</emph> Any integer expression that specifies bitwise file attributes. The Dir function only returns files or directories that match the specified attributes. You can combine several attributes by adding the attribute values:</paragraph>
48<paragraph role="paragraph" id="par_id3149666" xml-lang="en-US" l10n="U" oldref="11">0 : Normal files.</paragraph>
49<paragraph role="paragraph" id="par_id3147427" xml-lang="en-US" l10n="U" oldref="15">16 : Returns the name of the directory only.</paragraph>
50<paragraph role="paragraph" id="par_id3153952" xml-lang="en-US" l10n="U" oldref="16">Use this attribute to check if a file or directory exists, or to determine all files and folders in a specific directory.</paragraph>
51<paragraph role="paragraph" id="par_id3159156" xml-lang="en-US" l10n="U" oldref="17">To check if a file exists, enter the complete path and name of the file. If the file or directory name does not exist, the Dir function returns a zero-length string ("").</paragraph>
52<paragraph role="paragraph" id="par_id3154012" xml-lang="en-US" l10n="U" oldref="18">To generate a list of all existing files in a specific directory, proceed as follows: The first time you call the Dir function, specify the complete search path for the files, for example, "D:\Files\*.sxw". If the path is correct and the search finds at least one file, the Dir function returns the name of the first file that matches the search path. To return additional file names that match the path, call Dir again, but with no arguments.</paragraph>
53<paragraph role="paragraph" id="par_id3147348" xml-lang="en-US" l10n="U" oldref="19">To return directories only, use the attribute parameter. The same applies if you want to determine the name of a volume (for example, a hard drive partition)</paragraph>
54<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
55<embed href="text/sbasic/shared/00000003.xhp#err5"/>

--- 22 unchanged lines hidden ---
48<paragraph role="paragraph" id="par_id3149666" xml-lang="en-US" l10n="U" oldref="11">0 : Normal files.</paragraph>
49<paragraph role="paragraph" id="par_id3147427" xml-lang="en-US" l10n="U" oldref="15">16 : Returns the name of the directory only.</paragraph>
50<paragraph role="paragraph" id="par_id3153952" xml-lang="en-US" l10n="U" oldref="16">Use this attribute to check if a file or directory exists, or to determine all files and folders in a specific directory.</paragraph>
51<paragraph role="paragraph" id="par_id3159156" xml-lang="en-US" l10n="U" oldref="17">To check if a file exists, enter the complete path and name of the file. If the file or directory name does not exist, the Dir function returns a zero-length string ("").</paragraph>
52<paragraph role="paragraph" id="par_id3154012" xml-lang="en-US" l10n="U" oldref="18">To generate a list of all existing files in a specific directory, proceed as follows: The first time you call the Dir function, specify the complete search path for the files, for example, "D:\Files\*.sxw". If the path is correct and the search finds at least one file, the Dir function returns the name of the first file that matches the search path. To return additional file names that match the path, call Dir again, but with no arguments.</paragraph>
53<paragraph role="paragraph" id="par_id3147348" xml-lang="en-US" l10n="U" oldref="19">To return directories only, use the attribute parameter. The same applies if you want to determine the name of a volume (for example, a hard drive partition)</paragraph>
54<embed href="text/sbasic/shared/00000003.xhp#errorcode"/>
55<embed href="text/sbasic/shared/00000003.xhp#err5"/>

--- 22 unchanged lines hidden ---