FileExtensions Class
Namespace: Nucleus.Extensions
Assembly: Nucleus.Extensions.dll
File extensions
Methods
EncodeFileId
(File) Method
EncodeFileId (File file)
Return an encoded file id for the specified file.
EncodeFileId
(Guid) Method
EncodeFileId (Guid fileId)
Return an encoded file id for the specified file id.
DecodeFileId
(String) Method
DecodeFileId (String encodedPath)
Return a decoded file path for the specified encoded path.
GetMIMEType
(File,Boolean) Method
GetMIMEType (File file, Boolean addCharset)
Return the content type for the file, or application/octet-stream if the file extension was not matched to a MIME type.
GetImageDimensions
(File,Site,IFileSystemManager) Method
GetImageDimensions (File file, Site site, IFileSystemManager fileSystemManager)
Retrieve the height and width of the file (if its file extension indicates that it is an image) and set the height/width properties of the specified file.
Returns
Returns true on success, or false if the file extension does not indicate that the file is an image, or there is an error rendering the image.