Click or drag to resize

ProjectFolderGetFolderPartWithoutTrailingDirectorySeparatorChar Method

Intended for scripting purposes only! Gets the directory part of a full qualified name, but without the trailing DirectorySeparatorChar. No exception is thrown if the directory part is the root folder, thus the names '\Alice' and 'Alice' both return an empty string. The full qualified name can either be the name of an item (worksheet, graph) or a full folder name. If the name of a item is provided, the item's directory name (without trailing DirectorySeparatorChar) is returned. If a full folder path is provided (i.e. either an empty string or a string ending with a DirectorySeparatorChar), the name of the parent folder (without trailing DirectorySeparatorChar) is returned.

Namespace: Altaxo.Main
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static string GetFolderPartWithoutTrailingDirectorySeparatorChar(
	string fullName
)

Parameters

fullName  String
The full qualified name of (either an item's name or a full folder name).

Return Value

String
Name of the parent folder, but without trailing DirectorySeparatorChar.
See Also