splitPathName

Split path name in directory, file name kernel, file name extension

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

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"

Syntax

(directory, name, extension) = splitPathName(pathName)

Inputs (1)

pathName

Type: String

Description: Absolute or relative file or directory name

Outputs (3)

directory

Type: String

Description: Name of the directory including a trailing '/'

name

Type: String

Description: Name of the file without the extension

extension

Type: String

Description: Extension of the file name. Starts with '.'