1
0
mirror of https://github.com/Halofreak1990/XFXFramework synced 2024-12-26 13:49:34 +01:00
XFXFramework/include/System/IO/DirectoryInfo.h
Halofreak1990 e7a47c8ed9 Revamped the List class so that it can (properly) handle pointers as well
Added 'ValueTypes' Single and Double
Added some components in the new System::Net namespace
Added the Console class, which can be used to output text to the screen
Updated a bunch of structs to include the IComparable and IEquatable interfaces, and inheritance from Object to allow better interoperability between container classes and other types
Replaced all exception handling code with a report to stdout.txt - this will, I hope, eventually be reversed, but as of yet, there is no support for exceptions.

BEWARE! Even though all libraries correctly compile, you cannot use any class/structure that inherits from a template class, because stupid G++ wants to include exception handling for each template.
2011-11-07 01:29:50 +00:00

53 lines
1.8 KiB
C++

/********************************************************
* DirectoryInfo.h *
* *
* XFX DirectoryInfo definition file *
* Copyright © XFX Team. All Rights Reserved *
********************************************************/
#ifndef _SYSTEM_IO_DIRECTORYINFO_
#define _SYSTEM_IO_DIRECTORYINFO_
#include "../Types.h"
#include "FileSystemInfo.h"
namespace System
{
namespace IO
{
class Directory;
// Exposes instance methods for creating, moving, and enumerating through directories and subdirectories. This class cannot be inherited.
class DirectoryInfo : public FileSystemInfo, virtual Object
{
private:
friend class Directory;
char* current;
char* parent;
DirectoryInfo();
public:
bool Exists();
char* Name();
DirectoryInfo Parent();
DirectoryInfo Root();
DirectoryInfo(char* path); // Initializes a new instance of the System::IO::DirectoryInfo class on the specified path.
void Create(); // Creates a directory.
DirectoryInfo CreateSubDirectory(const char* path); // Creates a subdirectory or subdirectories on the specified path. The specified path can be relative to this instance of the System::IO::DirectoryInfo class.
void Delete(); // Deletes this System::IO::DirectoryInfo if it is empty.
void Delete(bool recursive); // Deletes this instance of a System::IO::DirectoryInfo, specifying whether to delete subdirectories and files.
DirectoryInfo* GetDirectories(); //
DirectoryInfo* GetDirectories(const char* searchPattern);
FileSystemInfo* GetFileSystemInfos();
FileSystemInfo* GetFileSystemInfos(const char* searchPattern);
void MoveTo(const char* destDirName);
char* ToString();
};
}
}
#endif //_SYSTEM_IO_DIRECTORYINFO_