resource public \Bitrix\Main\IO\Path::getDirectory( string $path );
Static method gets path and returns path without file name.