haxe/src/haxe/Resource.cs
// Generated by Haxe 4.3.7

#pragma warning disable 109, 114, 219, 429, 168, 162
namespace haxe {
	public class Resource : global::haxe.lang.HxObject {
		
		static Resource() {
			global::haxe.Resource.content = new global::Array<string>(new string[]{});
		}
		
		
		public Resource(global::haxe.lang.EmptyObject empty) {
		}
		
		
		public Resource() {
			global::haxe.Resource.__hx_ctor_haxe_Resource(this);
		}
		
		
		protected static void __hx_ctor_haxe_Resource(global::haxe.Resource __hx_this) {
		}
		
		
		public static global::Array<string> content;
		
		public static global::haxe.ds.StringMap<string> paths;
		
		public static global::haxe.ds.StringMap<string> getPaths() {
			unchecked {
				if (( global::haxe.Resource.paths != null )) {
					return global::haxe.Resource.paths;
				}

				// Whitelist-safe: no reflection/assembly access. Expose an empty resource map.
				global::haxe.ds.StringMap<string> p = new global::haxe.ds.StringMap<string>();
				return global::haxe.Resource.paths = p;
			}
		}
		
		
		public static global::Array<string> listNames() {
			return global::haxe.Resource.content.copy();
		}
		
		
		public static string getString(string name) {
			name = global::haxe.io.Path.escape(name, new global::haxe.lang.Null<bool>(true, true));
			string path = global::haxe.lang.Runtime.toString((((global::haxe.ds.StringMap<string>) (global::haxe.ds.StringMap<object>.__hx_cast<string>(((global::haxe.ds.StringMap) (((global::haxe.IMap<string, string>) (global::haxe.Resource.getPaths()) )) ))) ).@get(name)).toDynamic());
			if (( path == null )) {
				return null;
			}

			// No embedded resource access in whitelist mode.
			return null;
		}
		
		
		public static global::haxe.io.Bytes getBytes(string name) {
			name = global::haxe.io.Path.escape(name, new global::haxe.lang.Null<bool>(true, true));
			string path = global::haxe.lang.Runtime.toString((((global::haxe.ds.StringMap<string>) (global::haxe.ds.StringMap<object>.__hx_cast<string>(((global::haxe.ds.StringMap) (((global::haxe.IMap<string, string>) (global::haxe.Resource.getPaths()) )) ))) ).@get(name)).toDynamic());
			if (( path == null )) {
				return null;
			}

			// No embedded resource access in whitelist mode.
			return null;
		}
		
		
	}
}