/ LJCPHPCodeDoc / LJCCommonLib / LJC / GetFileSpecPath


Parameters
$fileSpec - The file specification.

Returns

The file path.

Syntax

PHP
public static function GetFileSpecPath(string $fileSpec): string

Gets the Path from the file spec.

Remarks

Parses to the last "/".

Example

PHP
 // Gets the Path from the file spec.
 private static function GetFileSpecPath()
 {
   $fileSpec = "../Folder/File.txt";
   $result = LJC::GetFileSpecPath($fileSpec);
 
   // result:
   // ../Folder
 }

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.