mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 17:31:58 -05:00
27 lines
396 B
C
27 lines
396 B
C
|
#pragma once
|
||
|
|
||
|
#include "String.h"
|
||
|
#include <stdio.h>
|
||
|
|
||
|
namespace AK {
|
||
|
|
||
|
class TemporaryFile {
|
||
|
public:
|
||
|
TemporaryFile();
|
||
|
~TemporaryFile();
|
||
|
|
||
|
bool isValid() const { return m_stream; }
|
||
|
FILE* stream() { return m_stream; }
|
||
|
String fileName() const { return m_fileName; }
|
||
|
void sync();
|
||
|
|
||
|
private:
|
||
|
FILE* m_stream { nullptr };
|
||
|
String m_fileName;
|
||
|
};
|
||
|
|
||
|
}
|
||
|
|
||
|
using AK::TemporaryFile;
|
||
|
|