/// <summary> /// Initializes a new instance of the <see cref="StorageInstance"/> class. /// </summary> /// <param name="prototype">The prototype.</param> /// <param name="runner">The runner.</param> /// <param name="path">The path.</param> public StorageInstance(ObjectInstance prototype, ScriptRunner runner, string path) : base(prototype) { this.runner = runner; this.path = path; try { this.mbro = CreateMbro(path); } catch (Exception e) { throw new JavaScriptException(Engine, "Error", "Error occured in mbro creation.", e); } PopulateFunctions(); }
public void Drop() { mbro.Dispose(); mbro = null; Thread.Sleep(100); try { if (path != null) Directory.Delete(path, true); } catch { } }