Table of Contents

Interface IFile

Namespace
ToSic.Eav.Apps.Assets
Assembly
ToSic.Eav.Apps.dll

Describes a file asset as provided by the underlying environment (like DNN and Oqtane).

[PublicApi]
public interface IFile : IAsset
Inherited Members

Remarks

All APIs retrieving such a file always begin in either an App or ADAM context. So any relative path information begins there, as these paths are usually meant to be used either relative to that location, or for generating URLs.

Properties

Extension

The file extension of the real underlying file, without the leading dot.

string Extension { get; }

Property Value

string

The extension, like "pdf" or "jpg". pdf for C:\Inetpub\wwwroot\www.2sic.com\Portals\0\2sxc\content\assets\docs\terms\file.pdf

Folder

The full folder of the file beginning from the root (App or ADAMA), with trailing slash.

string Folder { get; }

Property Value

string

The folder name. assets/docs/terms/ for C:\Inetpub\wwwroot\www.2sic.com\Portals\0\2sxc\content\assets\docs\terms\file.pdf

FolderId

The folder ID of the file, if the underlying environment uses int IDs

int FolderId { get; }

Property Value

int

The id used by the environment to track this item. 19350 for C:\Inetpub\wwwroot\www.2sic.com\Portals\0\2sxc\content\assets\docs\terms\file.pdf

FullName

The full file name of the original file

string FullName { get; }

Property Value

string

The full file name with extension. file.pdf for C:\Inetpub\wwwroot\www.2sic.com\Portals\0\2sxc\content\assets\docs\terms\file.pdf

Size

The file size of the file, IF the underlying environment provides this.

int Size { get; }

Property Value

int

The size in bytes. 18273 for C:\Inetpub\wwwroot\www.2sic.com\Portals\0\2sxc\content\assets\docs\terms\file.pdf

SizeInfo

Size information object for files with specific properties to get the size in bytes, kilobytes, megabytes, etc.

ISizeInfo SizeInfo { get; }

Property Value

ISizeInfo

Remarks

Added in v14.04