Table of Contents

Interface IFileModel

Namespace
ToSic.Sxc.Cms.Assets
Assembly
ToSic.Sxc.dll

BETA: A File Model which describes a file as returned by the AppAssets DataSource.

[InternalApi_DoNotUse_MayChangeWithoutNotice("Still tweaking details and naming v19.0x")]
public interface IFileModel : ICanWrapData

Remarks

History

  • Introduced (BETA) in v19.00 for the AppAssets DataSource.
  • Not to be seen as final, since we may rename this type when we also
  • This is similar to the IFile but still a bit different. For example, it has a Folder property which is different from the Folder property.

Properties

Created

When the file/folder was created.

DateTime Created { get; }

Property Value

DateTime

Extension

The file name extension, without any dot. Purpose is to do switching between extensions. If you want to have a safe, merged file name, just take the FullName.

string Extension { get; }

Property Value

string

Folder

Reference to the folder this file is in. Returns null on the root folder.

IFolderModel Folder { get; }

Property Value

IFolderModel

FullName

The full name with extension. If it's a folder or there is no extension, then it's identical to the ToSic.Sxc.Cms.Assets.Internal.IFileModelSync.Name

string FullName { get; }

Property Value

string

Modified

When the file/folder was modified.

DateTime Modified { get; }

Property Value

DateTime

Name

The file name without extension.

string Name { get; }

Property Value

string

Path

Starting in the App-Root

string Path { get; }

Property Value

string

Size

The size in bytes.

int Size { get; }

Property Value

int

SizeInfo

ISizeInfo SizeInfo { get; }

Property Value

ISizeInfo

Url

The full url starting at the root of the site. Absolute but without protocol/domain.

string Url { get; }

Property Value

string