.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 2020-06-05T21:39:08Z by OpenModelica 1.16.0~dev-442-g2e5bc9f