Achilles.Acme.Storage.Azure.FileNameHelpers.GetDirectoryName C# (CSharp) Метод

GetDirectoryName() публичный статический Метод

Get the directory name of the specified directory
public static GetDirectoryName ( string dirPath ) : string
dirPath string directory absolute path
Результат string
        public static string GetDirectoryName( string dirPath )
        {
            if ( !dirPath.EndsWith( @"/" ) )
                throw new Exception( "Invalid argument for function:GetDirectoryName" );

            if ( dirPath == "/" )
                return "/";

            string noTagDirPath = dirPath.Remove( dirPath.Length - 1 );

            return GetFileName( noTagDirPath );
        }