Achilles.Acme.Storage.Azure.FileNameHelpers.GetFileName C# (CSharp) Method

GetFileName() public static method

Get the fileName of the specified file
public static GetFileName ( string filePath ) : string
filePath string file name, absolute path
return string
        public static string GetFileName( string filePath )
        {
            if ( filePath.EndsWith( @"/" ) )
                throw new Exception( "Invalid argument for function:GetFileName" );

            int idx = filePath.LastIndexOf( '/' );
            return filePath.Substring( idx + 1 );
        }