User Tools

Site Tools


syntax:functions:directory

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Last revisionBoth sides next revision
syntax:functions:directory [2018/06/11 07:20] – created dmitrysyntax:functions:directory [2021/07/31 01:44] craigt
Line 1: Line 1:
-===== directory(text) =====+====== Directory(full_path) =====
 +Category:  File function  (found in the "Special" category in the EasyMorph application)
  
-Extracts the full directory path from a full file path.+\\  
 +=====Description===== 
 +This function extracts the directory path from a full file path, excluding the file name. 
 + 
 +\\  
 +=====Arguments===== 
 +^Argument^Type^Description^ 
 +|full_path  |Text  |A full file path including the directory path and file name.| 
 + 
 +**Return value type:** Text. 
 + 
 +\\  
 +=====Remarks===== 
 +Return values containing //only// a root path will include the trailing backslash while non-root paths will //not// include the trailing backslash.  See the "Examples" section below. 
 + 
 + 
 +\\  
 +=====Examples===== 
 + 
 +  directory('C:\myproject.morph') = 'C:\'  //Root paths include a backslash. 
 +  directory('C:\Documents\myproject.morph') = 'C:\Documents'  //No trailing backslash for non-root paths. 
 +  directory('C:\Documents\MyProjects\March\myproject.morph') = 'C:\Documents\MyProjects\March'  //3 levels deep.
  
-^  Example  ^  Result  ^  Notes  ^ 
-| directory('C:\Documents\myproject.morph' |C:\Documents | No trailing backslash for non-root paths.| 
-| directory('C:\myproject.morph' |C:\ | Root paths have a backslash| 
syntax/functions/directory.txt · Last modified: 2021/08/29 00:55 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki