public GetPathForNewTempFile ( bool doCreateTheFile ) : string | ||
doCreateTheFile | bool | |
return | string |
public string GetPathForNewTempFile(bool doCreateTheFile)
{
string s = System.IO.Path.GetRandomFileName();
s = System.IO.Path.Combine(_path, s);
if (doCreateTheFile)
{
RobustFile.Create(s).Close();
}
return s;
}
TemporaryFolder::GetPathForNewTempFile ( bool doCreateTheFile, string extension ) : string |
public TempFile(TemporaryFolder parentFolder) { if (parentFolder != null) { _path = parentFolder.GetPathForNewTempFile(true); } else { _path = System.IO.Path.GetTempFileName(); } }