mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-22 00:19:19 +01:00
Add debug display for ResidentResources.
This commit is contained in:
parent
ad55d178d4
commit
98b4b29ff5
8 changed files with 59 additions and 102 deletions
|
|
@ -12,7 +12,7 @@ public static class TempFile
|
|||
{
|
||||
var name = Path.GetRandomFileName();
|
||||
var path = new FileInfo( Path.Combine( baseDir.FullName,
|
||||
suffix.Any() ? name.Substring( 0, name.LastIndexOf( '.' ) ) + suffix : name ) );
|
||||
suffix.Length > 0 ? name[ ..name.LastIndexOf( '.' ) ] + suffix : name ) );
|
||||
if( !path.Exists )
|
||||
{
|
||||
return path;
|
||||
|
|
@ -21,13 +21,4 @@ public static class TempFile
|
|||
|
||||
throw new IOException();
|
||||
}
|
||||
|
||||
public static FileInfo WriteNew( DirectoryInfo baseDir, byte[] data, string suffix = "" )
|
||||
{
|
||||
var fileName = TempFileName( baseDir, suffix );
|
||||
using var stream = fileName.OpenWrite();
|
||||
stream.Write( data, 0, data.Length );
|
||||
fileName.Refresh();
|
||||
return fileName;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue