User Tools

Site Tools


syntax:functions:ispathrooted

Differences

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

Link to this comparison view

syntax:functions:ispathrooted [2017/12/23 09:40] – created dmitrysyntax:functions:ispathrooted [2021/08/29 01:07] (current) craigt
Line 1: Line 1:
-===== ispathrooted(path) =====+====== IsPathRooted(full_path) =====
 +Category:  File function  (found in the "Special" category in the EasyMorph application)
  
-Detects if a path to file or folder contains a root. Supports network locations.+\\  
 +=====Description===== 
 +This function detects if a path to file or folder contains a root.
  
-^  Example  ^  Result +Network locations are supported.
-| ispathrooted('C:\Documents\myproject.morph' |  TRUE  | +
-| ispathrooted('..\myproject.morph' |  FALSE  |+
  
 +\\ 
 +=====Use cases=====
 +Use this function to differentiate between an //absolute// path versus a //relative// path.
 +
 +\\ 
 +=====Arguments=====
 +^Argument^Type^Description^
 +|full_path  |Text  |A local or network file path, with or without a file name.|
 +
 +**Return value type:** Boolean (TRUE/FALSE)
 +
 +\\ 
 +=====Examples=====
 +
 +  ispathrooted('C:\Documents\myproject.morph' //Returns TRUE
 +
 +  ispathrooted('…\mypath\myfile.txt' //Returns FALSE
 +
 +  ispathrooted('\\MyComputer\MyFiles\' //Returns TRUE (network path, without file name)
 +
 +\\ 
 +=====See also=====
 +  * [[syntax:functions:directory|Directory(full_path)]]
  
syntax/functions/ispathrooted.1514040058.txt.gz · Last modified: 2017/12/23 09:40 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki