public static string getTMP() { if (_tmp == null) { string tmp = getTMP_EnvName("TMP"); if (tmp == null) { tmp = getTMP_EnvName("TEMP"); if (tmp == null) { tmp = getTMP_EnvName("ProgramData"); if (tmp == null) { throw null; } // 書き込みテスト -- ProgramDataってゲストでも書けるっぽい。 { string dir = Path.Combine(tmp, StringTools.getUUID() + "_test"); Directory.CreateDirectory(dir); Directory.Delete(dir); } } } tmp = Path.Combine(tmp, Program.APP_IDENT); deletePath(tmp); Directory.CreateDirectory(tmp); _tmp = tmp; } return(_tmp); }
public static string getTMP() { if (_tmp == null) { string tmp = getTMP_envName("TMP"); if (tmp == null) { tmp = getTMP_envName("TEMP"); if (tmp == null) { tmp = getTMP_envName("ProgramData"); if (tmp == null) { throw null; } // 書き込みテスト -- ProgramDataってゲストでも書けるっぽい。 { string dir = Path.Combine(tmp, StringTools.getUUID() + "_test"); Directory.CreateDirectory(dir); Directory.Delete(dir); } } } tmp = Path.Combine(tmp, Program.APP_IDENT) + ".tmp"; for (int c = 0; ; c++) { string trialTmp = Path.Combine(tmp, StringTools.zPad(c, 4)); if (Directory.Exists(trialTmp) == false) { tmp = trialTmp; break; } } Directory.CreateDirectory(tmp); _tmp = tmp; } return(_tmp); }
public NamedEventPair() : this(StringTools.getUUID()) { }
public string makePath() { return(makePath(StringTools.getUUID())); }
public WorkingDir() : this(StringTools.getUUID()) { }