Files
RAGECOOP-V/Core/Scripting/ResourceFile.cs

29 lines
727 B
C#
Raw Normal View History

using System;
2022-07-01 12:22:31 +08:00
using System.IO;
using System.Text.Json.Serialization;
2022-07-01 12:22:31 +08:00
namespace RageCoop.Core.Scripting
{
2022-09-08 12:41:56 -07:00
/// <summary>
/// </summary>
public class ResourceFile
2022-07-01 12:22:31 +08:00
{
2022-09-08 12:41:56 -07:00
/// <summary>
2022-10-23 19:02:39 +08:00
/// Full name with relative path of this file
2022-09-08 12:41:56 -07:00
/// </summary>
[JsonInclude]
2022-09-08 12:41:56 -07:00
public string Name { get; internal set; }
2022-10-23 19:02:39 +08:00
2022-09-08 12:41:56 -07:00
/// <summary>
2022-10-23 19:02:39 +08:00
/// Whether this is a directory
2022-09-08 12:41:56 -07:00
/// </summary>
[JsonInclude]
2022-09-08 12:41:56 -07:00
public bool IsDirectory { get; internal set; }
2022-10-23 19:02:39 +08:00
2022-09-08 12:41:56 -07:00
/// <summary>
2022-10-23 19:02:39 +08:00
/// Get a stream that can be used to read file content.
2022-09-08 12:41:56 -07:00
/// </summary>
2023-02-13 20:44:50 +08:00
[JsonIgnore]
2022-09-08 12:41:56 -07:00
public Func<Stream> GetStream { get; internal set; }
2022-07-01 12:22:31 +08:00
}
2022-10-23 19:02:39 +08:00
}