FileIcons
Assembly: ServiceStack.Blazor.dll
View Source
Declaration
public static class FileIcons
Fields
Icons
View Source
Declaration
public static Dictionary<string, string> Icons
Methods
EncodeSvg(String)
Encode SVG for embedding in Data URI
View Source
Declaration
public static string EncodeSvg(string svg)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | svg |
SvgToDataUri(String)
Convert SVG to Data URI
View Source
Declaration
public static string SvgToDataUri(string svg)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | svg |
GetFileName(String)
Return file name part of URI or file path
View Source
Declaration
public static string GetFileName(string path)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | path |
GetExt(String)
Return file extension (without '.; prefix) of path or URI
View Source
Declaration
public static string GetExt(string path)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | path |
CanPreview(String)
Return whether path is a URI to a previewable image
View Source
Declaration
public static bool CanPreview(string path)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | path |
FilePathUri(String)
Get the Icon src for a file path or URI, previewable resources will return self, otherwise returns SVG URI of .ext
View Source
Declaration
public static string FilePathUri(string path)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | path |
ExtSrc(String)
Get Icon src for .ext
View Source
Declaration
public static string ExtSrc(string ext)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | ext |
ExtSvg(String)
Get Icon SVG for .ext
View Source
Declaration
public static string ExtSvg(string ext)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | ext |
IconFallbackSrc(String, String)
View Source
Declaration
public static string IconFallbackSrc(string src, string fallbackSrc = null)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | src |
System.String | fallbackSrc |