2023-03-19 15:13:24 +08:00
|
|
|
|
using System;
|
2022-07-01 12:22:31 +08:00
|
|
|
|
using System.IO;
|
2023-03-19 15:13:24 +08:00
|
|
|
|
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>
|
2022-10-15 11:09:17 +08:00
|
|
|
|
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>
|
2023-03-19 15:13:24 +08:00
|
|
|
|
[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>
|
2023-03-19 15:13:24 +08:00
|
|
|
|
[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
|
|
|
|
}
|