Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
DirAccess Class Referenceabstract

#include <dir_access.h>

Inheritance diagram for DirAccess:
DirAccessPack

Public Types

enum  AccessType { ACCESS_RESOURCES, ACCESS_USERDATA, ACCESS_FILESYSTEM, ACCESS_MAX }
 
typedef DirAccess *(* CreateFunc) ()
 

Public Member Functions

virtual bool list_dir_begin ()=0
 This starts dir listing.
 
virtual String get_next (bool *p_is_dir)
 
virtual String get_next ()=0
 
virtual bool current_is_dir () const =0
 
virtual bool current_is_hidden () const =0
 
virtual void list_dir_end ()=0
 
virtual int get_drive_count ()=0
 
virtual String get_drive (int p_drive)=0
 
virtual int get_current_drive ()
 
virtual Error change_dir (String p_dir)=0
 can be relative or absolute, return false on success
 
virtual String get_current_dir ()=0
 return current dir location
 
virtual Error make_dir (String p_dir)=0
 
virtual Error make_dir_recursive (String p_dir)
 
virtual Error erase_contents_recursive ()
 
virtual bool file_exists (String p_file)=0
 
virtual bool dir_exists (String p_dir)=0
 
virtual size_t get_space_left ()=0
 
virtual Error copy (String p_from, String p_to)
 
virtual Error rename (String p_from, String p_to)=0
 
virtual Error remove (String p_name)=0
 

Static Public Member Functions

static String normalize_path (const String &p_path)
 
static bool exists (String p_dir)
 
static String get_full_path (const String &p_path, AccessType p_access)
 
static DirAccesscreate_for_path (const String &p_path)
 
static DirAccesscreate (AccessType p_access)
 
template<class T >
static void make_default (AccessType p_access)
 
static DirAccessopen (const String &p_path, Error *r_error=NULL)
 

Protected Member Functions

String _get_root_path () const
 
String _get_root_string () const
 
String fix_path (String p_path) const
 

Static Protected Member Functions

template<class T >
static DirAccess_create_builtin ()
 

Protected Attributes

bool next_is_dir
 

Detailed Description

Author
Juan Linietsky reduz.nosp@m.io@g.nosp@m.mail..nosp@m.com

The documentation for this class was generated from the following files: