Go to: Synopsis. Return value. MEL examples.

Synopsis

dirname( string $path )

Strips the last level of the given pathname. On Windows, all '\' characters in $path (input as "\\") are replaced with '/'.

Return value

None

Arguments

Variable Name Variable Type Description
$pathstringPath string to strip

MEL examples

	string $path = "/usr/people/gamera/gamera.mel";
	string $dirname = dirname( $path );
	// Result: /usr/people/gamera //
  string $ntPath = "C:/aw/godzilla/hello.c";
	dirname( $ntPath );
	// Result: C:/aw/godzilla //