<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Class Path - Class Path</title> <link href="faldoc.css" rel="stylesheet" type="text/css"/> <link href="tabs.css" rel="stylesheet" type="text/css"/> </head> <body class="faldoc_body"> <div class="navitop"> <div class="tabs"> <ul> <li><a href="./index.html"><span>Main</span></a></li> <li><a href="./pages.html"><span>Related pages</span></a></li> <li><a href="./groups.html"><span>Groups</span></a></li> <li><a href="./funset.html"><span>Function sets</span></a></li> <li><a href="./classes.html"><span>Classes</span></a></li> <li><a href="./objects.html"><span>Objects</span></a></li> <li><a href="./functions.html"><span>All functions</span></a></li> <li><a href="./globals.html"><span>Globals</span></a></li> </ul> </div> </div> <hr/> <h1 class="faldoc_title">Class Path</h1> <p class="faldoc_brief">Interface to local filesystem path definition. </p> <p class="faldoc_funcdecl"> <b>class</b> Path( [path] ) </p> <p class="faldoc_brief"><a href="#more">more...</a></p> <h2 class="faldoc_title">Summary</h2> <table class="faldoc_list"> <tr><td><a href="#extension">extension</a></td><td>File extension part. </td></tr> <tr><td><a href="#file">file</a></td><td>File part. </td></tr> <tr><td><a href="#filename">filename</a></td><td>File name part. </td></tr> <tr><td><a href="#fulloc">fulloc</a></td><td>Unit specificator and location. </td></tr> <tr><td><a href="#location">location</a></td><td>Location specificator. </td></tr> <tr><td><a href="#path">path</a></td><td>Complete path. </td></tr> <tr><td><a href="#unit">unit</a></td><td>Unit specificator. </td></tr> <tr><td><a href="#winfulloc">winfulloc</a></td><td>Complete path in MS-Windows format. </td></tr> <tr><td><a href="#winloc">winloc</a></td><td>Complete path in MS-Windows format. </td></tr> <tr><td><a href="#winpath">winpath</a></td><td>Complete path in MS-Windows format. </td></tr> </table> <a name="more"><h2 class="faldoc_title">Detailed description</h2></a> <p class="faldoc_funcdecl"> <b>class</b> Path( [path] ) </p> <table class="faldoc_function"> <tr><td class="faldoc_optparam">path</td><td class="faldoc_optparamdesc">The path that will be used as initial path. </td></tr> </table> <br/> <p class="item_brief">Interface to local filesystem path definition. </p> <p class="faldoc_text">This class offers an object oriented interface to access path elements given a complete path, or to build a path from its elements. </p> <p class="faldoc_text">Builds the path object, optionally using the given parameter as a complete path constructor. </p> <p class="faldoc_text">If the parameter is an array, it must have at least four string elements, and it will be used to build the path from its constituents. For example: </p> <pre class="faldoc_code"> unit = "C" location = "/a/path/to" file = "somefile" ext = "anext" p = Path( [ unit, location, file, ext ] ) </pre> <p class="faldoc_text"><b>nil</b> can be passed if some part of the specification is not used. </p> <p class="faldoc_text">The path (or any part of it) may be specified both in RFC3986 format or in MS-Windows path format. </p> <p class="faldoc_note"><span class="faldoc_notetype">Note:</span> Use the fileNameMerge() function to simply merge elements of a path specification into a string. </p> <h2 class="faldoc_title">Properties</h2> <h3 class="faldoc_funcname"><a name="extension">extension</a></h3> <p class="item_brief">File extension part. </p> <table class="faldoc_function"> <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc"> <table class="faldoc_raise"> <tr><td class="faldoc_raiseitem"><a href="./class_ParamError.html">ParamError</a></td><td class="faldoc_raisedesc">if assigned to a value that makes the path invalid. </td></tr> </table> </td></tr> </table> <p class="faldoc_text"><p class="faldoc_text">This element coresponds to the first last of the file element, if it is divided into a filename and an extension by a "." dot. </p> <p class="faldoc_note"><span class="faldoc_notetype">Note:</span> </p> <p class="faldoc_text"> If an extension is given, then <b>filename</b> is the same as <b>file</b>+ "." + <b>extension</b></p> </p> <h3 class="faldoc_funcname"><a name="file">file</a></h3> <p class="item_brief">File part. </p> <table class="faldoc_function"> <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc"> <table class="faldoc_raise"> <tr><td class="faldoc_raiseitem"><a href="./class_ParamError.html">ParamError</a></td><td class="faldoc_raisedesc">if assigned to a value that makes the path invalid. </td></tr> </table> </td></tr> </table> <p class="faldoc_text"><p class="faldoc_text">This element coresponds to the first part of the file element, if it is divided into a filename and an extension by a "." dot. </p> <p class="faldoc_note"><span class="faldoc_notetype">Note:</span> </p> <p class="faldoc_text"> If an extension is given, then <b>filename</b> is the same as <b>file</b>+ "." + <b>extension</b></p> </p> <h3 class="faldoc_funcname"><a name="filename">filename</a></h3> <p class="item_brief">File name part. </p> <table class="faldoc_function"> <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc"> <table class="faldoc_raise"> <tr><td class="faldoc_raiseitem"><a href="./class_ParamError.html">ParamError</a></td><td class="faldoc_raisedesc">if assigned to a value that makes the path invalid. </td></tr> </table> </td></tr> </table> <p class="faldoc_text"><p class="faldoc_text">This is the part of the path that identifies an element in a directory. It includes everything after the last "/" path separator. </p> <p class="faldoc_note"><span class="faldoc_notetype">Note:</span> </p> <p class="faldoc_text"> If an extension is given, then <b>filename</b> is the same as <b>file</b>+ "." + <b>extension</b></p> </p> <h3 class="faldoc_funcname"><a name="fulloc">fulloc</a></h3> <p class="item_brief">Unit specificator and location. </p> <table class="faldoc_function"> <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc"> <table class="faldoc_raise"> <tr><td class="faldoc_raiseitem"><a href="./class_ParamError.html">ParamError</a></td><td class="faldoc_raisedesc">if assigned to a value that makes the path invalid. </td></tr> </table> </td></tr> </table> <p class="faldoc_text"><p class="faldoc_text">This property contains the location of this path, including the unit specificator, if present. </p> <p class="faldoc_text"> So, in a path like "/C:/path/to/me.txt", the <b>fulloc</b> property (notice the two 'l' characters in the name) will have the value of "/C:/path/to", while in a relative path like "relative/file.txt" it will take the same value of <a href="./class_Path.html#location">Path.location</a>. </p> <p class="faldoc_text">Assigning a value to this property means to change the value of both the unit specificator and location at the same time. </p> </p> <h3 class="faldoc_funcname"><a name="location">location</a></h3> <p class="item_brief">Location specificator. </p> <table class="faldoc_function"> <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc"> <table class="faldoc_raise"> <tr><td class="faldoc_raiseitem"><a href="./class_ParamError.html">ParamError</a></td><td class="faldoc_raisedesc">if assigned to a value that makes the path invalid. </td></tr> </table> </td></tr> </table> <p class="faldoc_text"><p class="faldoc_text">This is the "path to file". It can start with a "/" or not; if it starts with a "/" it is considered absolute. </p> </p> <h3 class="faldoc_funcname"><a name="path">path</a></h3> <p class="item_brief">Complete path. </p> <table class="faldoc_function"> <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc"> <table class="faldoc_raise"> <tr><td class="faldoc_raiseitem"><a href="./class_ParamError.html">ParamError</a></td><td class="faldoc_raisedesc">if assigned to a value that makes the path invalid. </td></tr> </table> </td></tr> </table> <p class="faldoc_text"><p class="faldoc_text">This is the complete path referred by this object. </p> </p> <h3 class="faldoc_funcname"><a name="unit">unit</a></h3> <p class="item_brief">Unit specificator. </p> <table class="faldoc_function"> <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc"> <table class="faldoc_raise"> <tr><td class="faldoc_raiseitem"><a href="./class_ParamError.html">ParamError</a></td><td class="faldoc_raisedesc">if assigned to a value that makes the path invalid. </td></tr> </table> </td></tr> </table> <p class="faldoc_text"><p class="faldoc_text">This is the unit specificator (disk name) used in some filesystems. It is separated by the rest of the path via a ":". According to RFC 3986 it always starts with a "/", which is automatically added if absent. </p> </p> <h3 class="faldoc_funcname"><a name="winfulloc">winfulloc</a></h3> <p class="item_brief">Complete path in MS-Windows format. </p> <p class="faldoc_text"><p class="faldoc_text">This is the full location element in this path (unit specificator + location), given in MS-Windows format. </p> <p class="faldoc_text">Use this if you need to produce scripts or feed it into external process on windows platforms. Normally, all the I/O functions used by Falcon on any platform understand the RFC3986 format. </p> <p class="faldoc_note"><span class="faldoc_notetype">Note:</span> The property is read-only; you can anyhow assign a full location in MS-Windows format to the <a href="./class_Path.html#fulloc">Path.fulloc</a> property. </p> </p> <h3 class="faldoc_funcname"><a name="winloc">winloc</a></h3> <p class="item_brief">Complete path in MS-Windows format. </p> <p class="faldoc_text"><p class="faldoc_text">This is the location element in the complete path, given in MS-Windows format. </p> <p class="faldoc_text">Use this if you need to produce scripts or feed it into external process on windows platforms. Normally, all the I/O functions used by Falcon on any platform understand the RFC3986 format. </p> <p class="faldoc_note"><span class="faldoc_notetype">Note:</span> The property is read-only; you can anyhow assign a location in MS-Windows format to the <a href="./class_Path.html#location">Path.location</a> property. </p> </p> <h3 class="faldoc_funcname"><a name="winpath">winpath</a></h3> <p class="item_brief">Complete path in MS-Windows format. </p> <p class="faldoc_text"><p class="faldoc_text">This is the complete path referred by this object, given in MS-Windows format. </p> <p class="faldoc_text">Use this if you need to produce scripts or feed it into external process on windows platforms. Normally, all the I/O functions used by Falcon on any platform understand the RFC3986 format. </p> <p class="faldoc_note"><span class="faldoc_notetype">Note:</span> The property is read-only; you can anyhow assign a path in MS-Windows format to the <a href="./class_Path.html#path">Path.path</a> property. </p> </p> <hr/> <div class="navibottom"> <center> <a href="./index.html">Main</a> - <a href="./pages.html">Related pages</a> - <a href="./groups.html">Groups</a> - <a href="./funset.html">Function sets</a> - <a href="./classes.html">Classes</a> - <a href="./objects.html">Objects</a> - <a href="./functions.html">All functions</a> - <a href="./globals.html">Globals</a> </center> </div> </div> <div class="faldoc_signature">Made with <a href="http://www.falconpl.org">faldoc 2.2.0</div> </body> </html>