<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://miniscript.org/w/index.php?action=history&amp;feed=atom&amp;title=File.children</id>
	<title>File.children - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://miniscript.org/w/index.php?action=history&amp;feed=atom&amp;title=File.children"/>
	<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=File.children&amp;action=history"/>
	<updated>2026-04-10T15:05:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>http://miniscript.org/w/index.php?title=File.children&amp;diff=747&amp;oldid=prev</id>
		<title>JoeStrout: Created page with &quot;In Mini Micro and command-line MiniScript, the &lt;c&gt;file.children&lt;/c&gt; function returns a list of all the file names within the given directory.  See also: file...&quot;</title>
		<link rel="alternate" type="text/html" href="http://miniscript.org/w/index.php?title=File.children&amp;diff=747&amp;oldid=prev"/>
		<updated>2021-07-11T23:15:56Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;In &lt;a href=&quot;/wiki/Mini_Micro&quot; title=&quot;Mini Micro&quot;&gt;Mini Micro&lt;/a&gt; and &lt;a href=&quot;/wiki/Command-line_MiniScript&quot; class=&quot;mw-redirect&quot; title=&quot;Command-line MiniScript&quot;&gt;command-line MiniScript&lt;/a&gt;, the &amp;lt;c&amp;gt;&lt;a href=&quot;/wiki/File&quot; title=&quot;File&quot;&gt;file&lt;/a&gt;.children&amp;lt;/c&amp;gt; function returns a &lt;a href=&quot;/wiki/List&quot; title=&quot;List&quot;&gt;list&lt;/a&gt; of all the file names within the given directory.  See also: file...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;In [[Mini Micro]] and [[command-line MiniScript]], the &amp;lt;c&amp;gt;[[file]].children&amp;lt;/c&amp;gt; function returns a [[list]] of all the file names within the given directory.&lt;br /&gt;
&lt;br /&gt;
See also: [[file.child]]&lt;br /&gt;
&lt;br /&gt;
=== Arguments ===&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter Name !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| path|| absolute or relative path to a directory (defaults to [[file.curdir]])&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Usage Notes ==&lt;br /&gt;
&lt;br /&gt;
This method returns a list of all the files and directories within the directory specified by the given path (or if no path is given, then within the current directory).  This list does not include the special &amp;quot;.&amp;quot; and &amp;quot;..&amp;quot; files some platforms use to represent the current and parent directory.&lt;br /&gt;
&lt;br /&gt;
The file names are returned in the default order for the platform; this is alphabetical in Mini Micro, but not necessarily on desktop platforms.&lt;br /&gt;
&lt;br /&gt;
If given an invalid path, this returns &amp;lt;c&amp;gt;[[null]]&amp;lt;/c&amp;gt;.  Note that this is different from an empty directory, which returns an empty [[list]].&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
This prints the a list of all the file and directory names within the current directory.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ms&amp;gt;print file.children&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following lists the contents of a directory at the absolute path &amp;lt;c&amp;gt;/usr&amp;lt;/c&amp;gt;, one name per line.  (Note that this will generate an error if run on a platform where no &amp;lt;c&amp;gt;/usr&amp;lt;/c&amp;gt; directory exists.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ms&amp;gt;for name in file.children(&amp;quot;/usr&amp;quot;)&lt;br /&gt;
    print name&lt;br /&gt;
end for&amp;lt;/ms&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Mini Micro]]&lt;br /&gt;
[[Category:Command-Line MiniScript]]&lt;/div&gt;</summary>
		<author><name>JoeStrout</name></author>
		
	</entry>
</feed>