.Modelica.Utilities.Files.splitPathName

Information

Syntax

(directory, name, extension) = Files.splitPathName(pathName);

Description

Function splitPathName(..) splits a path name into its parts.

Example

(directory, name, extension) = Files.splitPathName("C:/user/test/input.txt")

-> directory = "C:/user/test/"
   name      = "input"
   extension = ".txt"

Interface

function splitPathName
  extends Modelica.Icons.Function;
  input String pathName "Absolute or relative file or directory name";
  output String directory "Name of the directory including a trailing '/'";
  output String name "Name of the file without the extension";
  output String extension "Extension of the file name. Starts with '.'";
end splitPathName;

Generated at 2024-12-24T19:25:53Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos