File Class

Namespace:
Weavy.Core.Models
Assembly:
Weavy.Core.dll

A content file.

Also used as fallback when actual file implementation cannot be resolved.

[Boost(0.8F)]
[Guid("1809C7D6-130A-4B35-9B16-C62A2DD23C01")]
[Content(Icon = "file", Name = "File", SingularName = "a file", PluralName = "files", CreateVerb = "Upload", ModifyVerb = "Update", Description = "A file uploaded to a folder.", CreateMode = UpsertMode.None)]
public class File : Content, IExpando, IDynamicMetaObjectProvider, IEnumerable<KeyValuePair<string, object>>, IEnumerable, IValidatableObject, IFile, ICommentable, IFollowable, IStarrable, ITaggable, IVersionable, IContent, IExtension, IAppEntity, ISpaceEntity, ITrashable, IEntity, ICloneable
Inheritance:
System.Object → ExpandoContentFile
Attributes:
BoostAttribute, System.Runtime.InteropServices.GuidAttribute, ContentAttribute
Implements:
IExpando, IFile, ICommentable, IFollowable, IStarrable, ITaggable, IVersionable, IContent, IExtension, IAppEntity, ISpaceEntity, ITrashable, IEntity

Constructors

File() Initializes a new instance of the File class.

Properties

Blob Gets or sets the underlying Blob with meta data about, and pointing to, the binary data of the file.
CommentIds Gets the ids of all comments for the entity.
Description Gets or sets a short description of the file.
FollowedByIds Gets the ids of the Users that follow the space.
StarredByIds Gets the ids of the users that have starred the item.
Tags Gets or sets the list of tags for the file.
Version Gets or sets the timestamp of the revision.

Methods

Clone() Create a deep copy of the current object.
CreateThumb(FileInfo) Creates a thumbnail image for the file.
GetIcon() Gets the icon to use for the file.
GetKind() Returns the kind of the file, e.g. "image", "document", "video" etc.

Extension Methods

IsNullOrDefault(T) Gets a value indicating if the specified value has the default value of the generic type.
MetaData(Content) Gets meta data for the specified content item.
IsIcon(File) See if the image considered to be an icon.
IsSmallIcon(File) See if the image considered to be a small icon.
Serialize(object) Serializes an object, or graph of connected objects, to a byte array.
SerializeToJson(object, Formatting?, JsonSerializerSettings) Serializes an object, or graph of connected objects, to a json string.
IsValid(object) Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type.
AvatarImg(File, int, bool, Color?, bool, object, int?, int?)
FAB(Content) Returns a FAB with links for adding child content.