2010-12-27 01:01:25 +00:00
/********************************************************
* DirectoryInfo . h *
* *
* XFX DirectoryInfo definition file *
* Copyright <EFBFBD> XFX Team . All Rights Reserved *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
# ifndef _SYSTEM_IO_DIRECTORYINFO_
# define _SYSTEM_IO_DIRECTORYINFO_
2010-12-04 16:14:34 +00:00
# include "../Types.h"
# include "FileSystemInfo.h"
namespace System
{
namespace IO
{
/// <summary>
/// Exposes instance methods for creating, moving, and enumerating through directories and subdirectories. This
/// class cannot be inherited.
/// </summary>
class DirectoryInfo : public FileSystemInfo
{
private :
char * current ;
char * parent ;
DirectoryInfo ( ) ;
public :
bool Exists ( ) ;
char * Name ( ) ;
DirectoryInfo Parent ( ) ;
DirectoryInfo Root ( ) ;
2010-12-28 01:12:19 +00:00
DirectoryInfo ( const char * path ) ; // Initializes a new instance of the System::IO::DirectoryInfo class on the specified path.
2010-12-04 16:14:34 +00:00
2010-12-28 01:12:19 +00:00
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 ( ) ; //
2010-12-27 01:01:25 +00:00
DirectoryInfo * GetDirectories ( const char * searchPattern ) ;
FileSystemInfo * GetFileSystemInfos ( ) ;
FileSystemInfo * GetFileSystemInfos ( const char * searchPattern ) ;
2010-12-04 16:14:34 +00:00
void MoveTo ( const char * destDirName ) ;
char * ToString ( ) ;
} ;
}
}
2010-12-27 01:01:25 +00:00
# endif //_SYSTEM_IO_DIRECTORYINFO_