<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="folder" module="max" category="Files">
	<digest>
		List the files in a folder
	</digest>
	<description>
		Outputs the all of the file names in a given folder. This can be especially useful for loading a <o>umenu</o>.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			Files
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				Path Name of Folder to List
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				File Name List, Connect to Menu
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				Count of Items Listed
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="pathname" optional="1" type="symbol">
			<digest>
				The absolute path to a folder
			</digest>
			<description>
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Output all file names in a folder
			</digest>
			<description>
				Gets the names of all files of a specific type within a specific folder, and outputs those names to be placed in a <o>message</o> object or a pop-up <o>umenu</o> object.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Output all file names in a folder
			</digest>
			<description>
				See the <m>bang</m> entry.
			</description>
		</method>
		<method name="anything">
			<arglist>
				<arg name="pathname" optional="0" type="list" />
			</arglist>
			<digest>
				Specify a new folder
			</digest>
			<description>
				See the <m>symbol</m> entry.
			</description>
		</method>
		<method name="symbol">
			<arglist>
				<arg name="pathname" optional="0" type="symbol" />
			</arglist>
			<digest>
				Specify a new folder
			</digest>
			<description>
				Specifies the pathname of a folder in the search path, and causes the contents of that folder to be output for storage in a <o>umenu</o> or a <o>message</o>. Input pathnames can contain slashes, colons, or backslashes as separators.
			</description>
			<discussion>
				<br />
				<br />
				A pathname looks like this:
				<br />
				<br />
				<m>&quot;drive:/folder/filename.ext&quot;</m> (absolute pathname)
				<br />
				<br />
				<m>&quot;./mypatches/steaksauce.ext&quot;</m> (relative pathname)
				<br />
				<br />
				If the pathname contains any spaces, you will need to enclose the pathname in double quotes in order to cause <o>folder</o> to understand the pathname as a single argument. Alternatively, you can precede each space with a backslash (<m>\</m>) so that <o>folder</o> won't treat that space as a special character. The path <m>./</m> may be used to refer to the Max directory, and the path <m>C74</m> represents the Cycling '74 directory.
			</discussion>
		</method>
		<method name="types">
			<arglist>
				<arg name="typecode" optional="0" type="list" />
			</arglist>
			<digest>
				Set the available file types
			</digest>
			<description>
				The word <m>types</m>, followed by one or more <link name="filetypes" module="core" type="vignette">four-letter filetype codes</link> sets the file types that the <o>folder</o> object will look for in the specified folder.
			</description>
			<discussion>
				Example four-letter type codes for files are:
				<br />
				<br />
				<m>AIFF</m>: sound files
				<br />
				<m>fold</m>: folders
				<br />
				<m>iLaX</m>: external objects
				<br />
				<m>JSON</m>: Max patches
				<br />
				<m>MooV</m>: Max patches
				<br />
				<br />
				<m>TEXT</m>: text files
				<br />
				<m>(empty)</m>: An empty <m>types</m> message can be sent to look for all file types.
				<br />
				By default, the <o>folder</o> object looks for TEXT files.
			</discussion>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="folder.png" caption="Read in filenames from a folder, then call them up from a pop-up menu" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="conformpath" />
		<seealso name="dropfile" />
		<seealso name="filein" />
		<seealso name="filepath" />
		<seealso name="opendialog" />
		<seealso name="pcontrol" />
		<seealso name="umenu" />
	</seealsolist>
	<discussion>
		The forward-slash character (<b>/</b>) is used as a path delineator. An initial slash at the beginning of a path indicates the boot volume. The Max application folder is referred to by using period-slash (e.g.: &quot;./Cycling '74/max-help&quot;), and the Cycling '74 folder may be referred to by using C74. A path on Macintosh systems is preceded by the name of the machine and a colon:
		<br />
		&quot;Macintosh HD:/Users/Documents/max stuff/Desktop/phase_vocoder.pat&quot;
		<br />
		On Windows systems, a path is preceded by a drive letter
		<br />
		&quot;C:/Documents/max stuff/Desktop/phase_vocoder.pat&quot;
	</discussion>
	<misc name="Output">
		<entry name="clear">
			<description>
				Out left outlet: When a pathname or a bang is received in the inlet, the first message that is sent out the left outlet is <m>clear</m>, which is intended to erase the contents of a receiving <o>message</o> or <o>umenu</o> object.
			</description>
		</entry>
		<entry name="append">
			<description>
				Out left outlet: Immediately following the <m>clear</m> message, each filename in the specified folder is sent out in alphabetical order preceded by the word <m>append</m>.
			</description>
		</entry>
		<entry name="int">
			<description>
				Out right outlet: When a pathname or a bang is received in the inlet, the number of items in the folder is sent out the right outlet.
			</description>
		</entry>
	</misc>
</c74object>
