fileDir
|
The fileDir function returns a String containing the names of all files and sub-directories
contained within the specified filePathname. Note: The fileDir function will return "" if the specified file or directory does NOT exist. Usage The fileDir function is used to a list of the file names and sub-directory names contained
within the specified directory or file name.
For instance the following Lisp code shows how to generate the name of the current directory path.
The fileDir function can be used to a provide details for the specified directory or file name.
For instance the following Lisp code shows how to generate the details for the current directory path.
The fileDir function can be used to a provide a listing for a specified name including wild cards.
The fileDir function can be used to a provide a listing for a specified name including wild cards as follows.
(setq listing (fileDir _path)) ;; Return a listing for the current directory
(writeln listing) ;; Display the directory listing on the console
Tutorial_OnlineDocs<DIR>
(setq listing (fileDir _path true)) ;; Return a listing for the current directory and its details
(writeln listing) ;; Display the directory listing on the console
Tutorial_OnlineDocs<DIR>;CreationTime[2014,9,28,3,54,17,256];LastAccessTime[2014,10,22,4,41,37,923];LastWriteTime[2014,10,22,4,41,37,923];FileSize[0]
(setq listing (fileDir (append _path "/*.*"))) ;; Return a listing for the current directory
(writeln listing) ;; Display the directory listing on the console
.<DIR>
..<DIR>
ais.asl
ais.log
ais.rsl
Binary<DIR>
CoreContent<DIR>
Foundry<DIR>
myarchive.odb
mysqldata<DIR>
mysqlmsgs<DIR>
OldMySQLDocs<DIR>
OldWordDocs<DIR>
OldXMLDocs<DIR>
README.txt
References<DIR>
Source<DIR>
Templates<DIR>
workspace.db
wwwroot<DIR>
(setq listing (fileDir (append _path "/*.*sl"))) ;; Return a listing for the current directory
(writeln listing) ;; Display the directory listing on the console
ais.asl
ais.rsl
(fileReadAll filePathName) ;; Return a listing for the current directory (fileReadAll filePathName showDetailsSW) ;; Return a listing for the current directory
Expression:
Arguments
Name
Type
Description Argument: filePathName String Text
The path and file name whose contents are to be listed Argument: showDetailsSW Boolean
If true, show details with each listing entry
Returns:
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Here are the links to the data types of the function arguments.
String | Boolean |
Here are also a number of links to functions having arguments with any of these data types.
Analytic Information Server (AIS)AIS Component Systems
|