1
0
mirror of https://github.com/Halofreak1990/XFXFramework synced 2024-12-26 13:49:34 +01:00
Halofreak1990 8f089dc2ab Added the current XFX directory tree.
WARNING!!! This revision cannot compile correctly. It is updated to reflect the many changes within the XFX project.
2010-12-04 16:14:34 +00:00

64 lines
1.9 KiB
C++

/********************************************************
* File.h *
* *
* XFX File definition file *
* Copyright © XFX Team. All Rights Reserved *
********************************************************/
#ifndef _FILE_
#define _FILE_
#include "Enums.h"
#if ENABLE_XBOX
#include <hal/fileio.h>
#else
#endif
namespace System
{
class DateTime;
namespace IO
{
class FileStream;
class StreamReader;
class StreamWriter;
/// <summary>
/// Provides static methods for the creation, copying, deletion, moving, and opening of files, and aids in the
/// creation of FileStream objects.
/// </summary>
class File
{
private:
#if ENABLE_XBOX
static int FileAttributeInfo(char* path, PXBOX_FIND_DATA data, bool tryagain, bool returnErrorOnNotFound);
#else
static int FileAttributeInfo(char* path, data, bool tryagain, bool returnErrorOnNotFound);
#endif
public:
static StreamWriter AppendText(char* path);
static void Copy(char* sourceFileName, char* destFileName);
static void Copy(char* sourceFileName, char* destFileName, bool overwrite);
static FileStream Create(char* path);
static FileStream Create(char* path, int bufferSize);
static StreamWriter CreateText(char* path);
static void Delete(char* path);
static bool Exists(char* path);
static DateTime GetCreationTime(char* path);
static DateTime GetLastAccessTime(char* path);
static DateTime GetLastWriteTime(char* path);
static void Move(char* sourceFileName, char* destFileName);
static FileStream Open(char* path, FileMode_t mode);
static FileStream Open(char* path, FileMode_t mode, FileAccess_t access);
static FileStream Open(char* path, FileMode_t mode, FileAccess_t access, FileShare_t share);
static FileStream OpenRead(char* path);
static StreamReader OpenText(char* path);
static FileStream OpenWrite(char* path);
};
}
}
#endif //_FILE_