<?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="conformpath" module="max" category="Files">
	<digest>
		Convert file paths styles
	</digest>
	<description>
		Converts paths between the older colon style formats and the current slash style. It can also be used to conform paths to either absolute, relative, boot volume relative, or Cycling 74 folder relative types.
	</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="symbol">
			<digest>
				(symbol) Path Input
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="symbol">
			<digest>
				(symbol) Path Input
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="symbol">
			<digest>
				(symbol) Conformed Path Output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="int">
			<digest>
				(int) Success
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg name="pathstyle" optional="1" type="symbol">
			<digest>
				The path style for output
			</digest>
			<description>
				An optional symbol argument specifies the pathstyle to be used as output. The possible pathstyle arguments are:
				<br />
				<br />
				colon: Specifies that the colon pathstyle is used for output.
				<br />
				<br />
				max: Specifies that the max pathstyle is used for output.
				<br />
				<br />
				native: Specifies that the native pathstyle is used for output.
				<br />
				<br />
				native_win: Specifies that the native_win pathstyle is used for output (See description of the <m>pathstyle</m> method for more details).
				<br />
				<br />
				Note: The use of the native_win style paths is not advised except for display purposes.
				<br />
				<br />
				slash: Specifies that the slash pathstyle is used for output.
				<br />
				<br />
				(See the description of the <m>pathstyle</m> method for more details).
			</description>
		</objarg>
		<objarg name="pathtype" optional="1" type="symbol">
			<digest>
				The path type for output
			</digest>
			<description>
				An optional symbol argument specifies the pathtype to be used as output. The possible pathtype arguments are:
				<br />
				<br />
				absolute: Specifies the output of the absolute pathname of the file or folder as a symbol.
				<br />
				<br />
				boot: Specifies the output of the pathname of the file or folder relative to the boot volume as a symbol.
				<br />
				<br />
				C74: Specifies the output of the pathname of the file or folder relative to the Cycling 74 folder as a symbol.
				<br />
				<br />
				relative: Specifies the output of the pathname of the file or folder relative to the Max application folder as a symbol.
				<br />
				<br />
				ignore: Specifies that no pathtype conversion is performed.
				<br />
				<br />
				(See description of the <m>pathtype</m> method for more details).
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="anything">
			<arglist>
				<arg name="filepath" optional="0" type="symbol" />
			</arglist>
			<digest>
				Convert a file path
			</digest>
			<description>
				A file name or path as a symbol. The <o>conformpath</o> object converts paths of one pathstyle (i.e., file paths that use colons or slashes as separators) and/or pathtype (paths that are absolute, relative, boot volume-relative, or Cycling 74 folder-relative) to another. It provides a superset of the functionality of the <o>absolutepath</o> and <o>relativepath</o> objects.
			</description>
		</method>
		<method name="pathstyle">
			<arglist>
				<arg name="pathstyle" optional="0" type="symbol" />
			</arglist>
			<digest>
				Set the path style for conversion
			</digest>
			<description>
				The word <m>pathstyle</m>, followed by a word that specifies a pathstyle, will conform the output pathname to the chosen styles. The possible styles are:
				<br />
				<br />
				<m>colon</m>: The <m>colon</m> style will use colons as separators when passing paths between objects. This style was used in Max versions 4.2 and earlier on Macintoshes Note: Since the native Macintosh pathstyle is the same as the colon path style, there is no native_mac pathstyle.
				<br />
				<br />
				<m>max</m>: (default) The <m>max</m> style will use whatever style the currently running version of Max uses to pass paths between objects.
				<br />
				<br />
				<m>native</m>: The <m>native</m> style will use whatever format is used by the currently running operating system to specify paths. Note: When working with native paths, only absolute paths will be valid for the operating system.
				<br />
				<br />
				<m>native_win</m>: The <m>native_win</m> style will use native Windows OS format (i.e., backslashes as separators) to specify paths. Note: <m>The use of the native_win style paths is not advised except for display purposes</m>- In Max, the backslash character is used as an escape character and could lead to problems if used in conjunction with message boxes, <o>sprintf</o>, <o>coll</o>, and other objects which parse text into atoms.
				<br />
				<br />
				<m>slash</m>: The <m>slash</m> style will use slashes as separators when passing paths between objects.
			</description>
		</method>
		<method name="pathtype">
			<arglist>
				<arg name="pathtype" optional="0" type="symbol" />
			</arglist>
			<digest>
				Set the path type for conversion
			</digest>
			<description>
				The word <m>pathtype</m>, followed by a word that specifies a pathtype, will conform the output pathname to the chosen type. The possible types are:
				<br />
				<br />
				<m>absolute</m>: The <m>absolute</m> type will output the absolute pathname of the file or folder as a symbol.
				<br />
				<br />
				<m>boot</m>: The <m>boot</m> type will output the pathname of the file or folder relative to the boot volume as a symbol. If the file is not relative to the boot file, the <o>conformpath</o> object will send a zero out the right outlet and send the output path out the left outlet unchanged.
				<br />
				<br />
				<m>C74</m>: The <m>C74</m> type will output the pathname of the file or folder relative to the Cycling 74 folder as a symbol. If the file is not relative to the Cycling 74 folder, the <o>conformpath</o> object will send a zero out the right outlet and send the output path out the left outlet unchanged.
				<br />
				<br />
				<m>relative</m>: The <m>relative</m> type will output the pathname of the file or folder relative to the Max application folder as a symbol. If the file is not relative to the Max application folder, the <o>conformpath</o> object will send a zero out the right outlet and send the output path out the left outlet unchanged.
				<br />
				<br />
				<m>ignore</m>: (default) The <m>ignore</m> type will perform no path type conversion.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="conformpath.png" caption="Use the getsystem message to Max to automatically conform file pathnames across platforms" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="absolutepath" />
		<seealso name="opendialog" />
		<seealso name="relativepath" />
		<seealso name="savedialog" />
		<seealso name="strippath" />
	</seealsolist>
	<discussion>
		<o>conformpath</o> can be used to convert paths between the old colon style format and the new slash style--these are the &quot;pathstyles&quot;. It can also be used to conform paths to either absolute, relative, boot volume relative, or Cycling 74 folder relative--these are the &quot;pathtypes&quot;.
		<br />
		<br />
		The &quot;max&quot; style will use whatever style the currently running version of Max uses to pass paths between objects. The &quot;native&quot; style will use whatever format is used by the currently running operating system to specify paths. There is only an explicit &quot;native_win&quot; pathstyle since the native Macintosh pathstyle is the same as the &quot;colon&quot; path style. Note that when working with native paths, only absolute paths will be valid for the operating system.
		<br />
		<br />
		The default pathstyle is &quot;max&quot;, and the default pathtype is &quot;ignore&quot;.
		<br />
		<br />
		In addition to the standard Max path syntax (<m>Drive:/path/to/file</m>), <o>conformpath</o> supports the following additional path prefixes:
		<ul>
			<li>
				<m>~:</m>- path relative to the user's home folder
			</li>
			<li>
				<m>C74:</m>- path relative to the Cycling '74 resources folder (on macOS, this is inside the application bundle <i>Max.app/Contents/Resources/C74/</i>; on Windows, this is the <i>resources</i> folder next to the <i>Max.exe</i> executable
			</li>
			<li>
				<m>Usermax:</m>- path relative to the <i>Max 8</i> folder in the user's <i>Documents</i> folder
			</li>
			<li>
				<m>Desktop:</m>- path relative to the user's <i>Desktop</i> folder
			</li>
			<li>
				<m>~Tempfolder:</m>- path relative to Max's temp folder (this folder will be automatically emptied when Max quits)
			</li>
			<li>
				<m>Package:/&lt;package-name&gt;/</m>- path relative to the package specified in <m>package-name</m>
			</li>
			<li>
				<m>Project:</m>- path relative to the project (if any) containing the <o>conformpath</o> object
			</li>
		</ul>
	</discussion>
	<misc name="Output">
		<entry name="symbol">
			<description>
				The pathname of the folder or file conformed to the specified pathstyle and/or pathtype.
			</description>
		</entry>
		<entry name="int">
			<description>
				Out right outlet: If the input file or folder is conformed to specified pathtype and/ or pathtype, the output is <m>1</m>. if the filepath cannot be conformed (e.g., if the file is not relative to a requested path type), the output is <m>0</m>.
			</description>
		</entry>
	</misc>
</c74object>
