2023-01-05 13:25:55 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								/**************************************************************************/  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/*  file_access.h                                                         */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/**************************************************************************/  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/*                         This file is part of:                          */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/*                             GODOT ENGINE                               */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/*                        https://godotengine.org                         */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/**************************************************************************/  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                  */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/*                                                                        */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* Permission is hereby granted, free of charge, to any person obtaining  */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* a copy of this software and associated documentation files (the        */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* "Software"), to deal in the Software without restriction, including    */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* without limitation the rights to use, copy, modify, merge, publish,    */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* distribute, sublicense, and/or sell copies of the Software, and to     */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* permit persons to whom the Software is furnished to do so, subject to  */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* the following conditions:                                              */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/*                                                                        */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* The above copyright notice and this permission notice shall be         */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* included in all copies or substantial portions of the Software.        */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/*                                                                        */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,        */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF     */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY   */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,   */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE      */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                 */  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/**************************************************************************/  
						 
					
						
							
								
									
										
										
										
											2018-01-05 00:50:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								# ifndef FILE_ACCESS_H 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# define FILE_ACCESS_H 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-09-05 13:01:31 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "core/io/compression.h" 
  
						 
					
						
							
								
									
										
										
										
											2018-09-11 18:13:45 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "core/math/math_defs.h" 
  
						 
					
						
							
								
									
										
										
										
											2022-03-23 11:08:58 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "core/object/ref_counted.h" 
  
						 
					
						
							
								
									
										
										
										
											2018-09-11 18:13:45 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "core/os/memory.h" 
  
						 
					
						
							
								
									
										
										
										
											2020-11-07 19:33:38 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "core/string/ustring.h" 
  
						 
					
						
							
								
									
										
										
										
											2018-09-11 18:13:45 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "core/typedefs.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								/**
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  Multi - Platform  abstraction  for  accessing  to  files . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-03-23 11:08:58 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								class  FileAccess  :  public  RefCounted  {  
						 
					
						
							
								
									
										
										
										
											2022-09-05 13:01:31 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									GDCLASS ( FileAccess ,  RefCounted ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								public :  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									enum  AccessType  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										ACCESS_RESOURCES , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										ACCESS_USERDATA , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										ACCESS_FILESYSTEM , 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-19 14:35:10 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										ACCESS_PIPE , 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										ACCESS_MAX 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-09-27 17:35:52 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									enum  ModeFlags  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										READ  =  1 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										WRITE  =  2 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										READ_WRITE  =  3 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										WRITE_READ  =  7 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-08-08 09:53:41 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									enum  UnixPermissionFlags  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										UNIX_EXECUTE_OTHER  =  0x001 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										UNIX_WRITE_OTHER  =  0x002 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										UNIX_READ_OTHER  =  0x004 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										UNIX_EXECUTE_GROUP  =  0x008 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										UNIX_WRITE_GROUP  =  0x010 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										UNIX_READ_GROUP  =  0x020 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										UNIX_EXECUTE_OWNER  =  0x040 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										UNIX_WRITE_OWNER  =  0x080 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										UNIX_READ_OWNER  =  0x100 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										UNIX_RESTRICTED_DELETE  =  0x200 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										UNIX_SET_GROUP_ID  =  0x400 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										UNIX_SET_USER_ID  =  0x800 , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-09-27 17:35:52 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									enum  CompressionMode  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										COMPRESSION_FASTLZ  =  Compression : : MODE_FASTLZ , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										COMPRESSION_DEFLATE  =  Compression : : MODE_DEFLATE , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										COMPRESSION_ZSTD  =  Compression : : MODE_ZSTD , 
							 
						 
					
						
							
								
									
										
										
										
											2023-03-29 09:31:25 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										COMPRESSION_GZIP  =  Compression : : MODE_GZIP , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										COMPRESSION_BROTLI  =  Compression : : MODE_BROTLI , 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-27 17:35:52 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									typedef  void  ( * FileCloseFailNotify ) ( const  String  & ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-13 10:10:50 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-03-23 11:08:58 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									typedef  Ref < FileAccess >  ( * CreateFunc ) ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2021-05-20 14:58:03 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  big_endian  =  false ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-05-12 17:01:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  real_is_double  =  false ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-08-08 09:53:41 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  BitField < UnixPermissionFlags >  _get_unix_permissions ( const  String  & p_file )  =  0 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  Error  _set_unix_permissions ( const  String  & p_file ,  BitField < UnixPermissionFlags >  p_permissions )  =  0 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  bool  _get_hidden_attribute ( const  String  & p_file )  =  0 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  Error  _set_hidden_attribute ( const  String  & p_file ,  bool  p_hidden )  =  0 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  bool  _get_read_only_attribute ( const  String  & p_file )  =  0 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  Error  _set_read_only_attribute ( const  String  & p_file ,  bool  p_ro )  =  0 ; 
							 
						 
					
						
							
								
									
										
										
										
											2019-04-07 15:46:52 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								protected :  
						 
					
						
							
								
									
										
										
										
											2022-09-05 13:01:31 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  void  _bind_methods ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-08-24 20:06:03 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									AccessType  get_access_type ( )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-05-05 02:12:55 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  String  fix_path ( const  String  & p_path )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-05 13:01:31 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  Error  open_internal ( const  String  & p_path ,  int  p_mode_flags )  =  0 ;  ///< open a file
 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  uint64_t  _get_modified_time ( const  String  & p_file )  =  0 ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-27 17:35:52 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  void  _set_access_type ( AccessType  p_access ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2016-06-13 10:10:50 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  FileCloseFailNotify  close_fail_notify ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-11-07 12:32:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# ifndef DISABLE_DEPRECATED 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  Ref < FileAccess >  _open_encrypted_bind_compat_98918 ( const  String  & p_path ,  ModeFlags  p_mode_flags ,  const  Vector < uint8_t >  & p_key ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-06-15 21:21:43 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									void  store_8_bind_compat_78289 ( uint8_t  p_dest ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  store_16_bind_compat_78289 ( uint16_t  p_dest ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  store_32_bind_compat_78289 ( uint32_t  p_dest ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  store_64_bind_compat_78289 ( uint64_t  p_dest ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  store_buffer_bind_compat_78289 ( const  Vector < uint8_t >  & p_buffer ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  store_var_bind_compat_78289 ( const  Variant  & p_var ,  bool  p_full_objects  =  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  store_half_bind_compat_78289 ( float  p_dest ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  store_float_bind_compat_78289 ( float  p_dest ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  store_double_bind_compat_78289 ( double  p_dest ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  store_real_bind_compat_78289 ( real_t  p_real ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  store_string_bind_compat_78289 ( const  String  & p_string ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  store_line_bind_compat_78289 ( const  String  & p_line ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  store_csv_line_bind_compat_78289 ( const  Vector < String >  & p_values ,  const  String  & p_delim  =  " , " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  store_pascal_string_bind_compat_78289 ( const  String  & p_string ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-11-07 12:32:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  void  _bind_compatibility_methods ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# endif 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								private :  
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									static  bool  backup_save ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-05 13:01:31 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									thread_local  static  Error  last_file_open_error ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-05-12 17:01:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									AccessType  _access_type  =  ACCESS_FILESYSTEM ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									static  CreateFunc  create_func [ ACCESS_MAX ] ;  /** default file access creation function for a platform */ 
							 
						 
					
						
							
								
									
										
										
										
											2024-03-07 20:29:49 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									template  < typename  T > 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-23 11:08:58 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  Ref < FileAccess >  _create_builtin ( )  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										return  memnew ( T ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-09-27 17:35:52 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  Ref < FileAccess >  _open ( const  String  & p_path ,  ModeFlags  p_mode_flags ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-10-21 15:02:08 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  _is_temp_file  =  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									bool  _temp_keep_after_use  =  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									String  _temp_path ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									void  _delete_temp ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  Ref < FileAccess >  _create_temp ( int  p_mode_flags ,  const  String  & p_prefix  =  " " ,  const  String  & p_extension  =  " " ,  bool  p_keep  =  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								public :  
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  void  set_file_close_fail_notify_callback ( FileCloseFailNotify  p_cbk )  {  close_fail_notify  =  p_cbk ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2016-06-13 10:10:50 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  bool  is_open ( )  const  =  0 ;  ///< true when file is open
 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-03-09 11:45:21 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  String  get_path ( )  const  {  return  " " ;  }  /// returns the path for the current open file
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  String  get_path_absolute ( )  const  {  return  " " ;  }  /// returns the absolute path for the current open file
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2019-03-26 18:51:13 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  void  seek ( uint64_t  p_position )  =  0 ;  ///< seek to a given position
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  void  seek_end ( int64_t  p_position  =  0 )  =  0 ;  ///< seek from the end of file with negative offset
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  uint64_t  get_position ( )  const  =  0 ;  ///< get position in the file
 
							 
						 
					
						
							
								
									
										
										
										
											2021-05-25 07:58:49 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  uint64_t  get_length ( )  const  =  0 ;  ///< get size of the file
 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  bool  eof_reached ( )  const  =  0 ;  ///< reading passed EOF
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-09 00:00:52 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-05-20 18:07:27 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  uint8_t  get_8 ( )  const ;  ///< get a byte
 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-09 00:00:52 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  uint16_t  get_16 ( )  const ;  ///< get 16 bits uint
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  uint32_t  get_32 ( )  const ;  ///< get 32 bits uint
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  uint64_t  get_64 ( )  const ;  ///< get 64 bits uint
 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-10-01 23:41:13 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  float  get_half ( )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									virtual  float  get_float ( )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  double  get_double ( )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  real_t  get_real ( )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-09-05 13:01:31 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Variant  get_var ( bool  p_allow_objects  =  false )  const ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-05-20 18:07:27 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  uint64_t  get_buffer ( uint8_t  * p_dst ,  uint64_t  p_length )  const  =  0 ;  ///< get an array of bytes, needs to be overwritten by children.
 
							 
						 
					
						
							
								
									
										
										
										
											2022-11-28 11:00:48 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Vector < uint8_t >  get_buffer ( int64_t  p_length )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									virtual  String  get_line ( )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-05-28 21:46:48 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  String  get_token ( )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2018-11-13 12:53:24 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  Vector < String >  get_csv_line ( const  String  & p_delim  =  " , " )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-05 13:01:31 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									String  get_as_text ( bool  p_skip_cr  =  false )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-07-31 18:46:53 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  String  get_as_utf8_string ( bool  p_skip_cr  =  false )  const ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-09 00:00:52 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-05-20 14:58:03 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									/**
 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-15 21:21:43 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-05-20 14:58:03 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									 *  Use  this  for  files  WRITTEN  in  _big_  endian  machines  ( ie ,  amiga / mac ) 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									 *  It ' s  not  about  the  current  CPU  type  but  file  formats . 
							 
						 
					
						
							
								
									
										
										
										
											2021-05-20 14:58:03 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									 *  This  flag  gets  reset  to  ` false `  ( little  endian )  on  each  open . 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									 */ 
							 
						 
					
						
							
								
									
										
										
										
											2021-05-20 14:58:03 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  void  set_big_endian ( bool  p_big_endian )  {  big_endian  =  p_big_endian ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									inline  bool  is_big_endian ( )  const  {  return  big_endian ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  Error  get_error ( )  const  =  0 ;  ///< get last error
 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-04-08 22:09:34 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  Error  resize ( int64_t  p_length )  =  0 ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-09-22 12:56:02 +07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  void  flush ( )  =  0 ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-15 21:21:43 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  bool  store_8 ( uint8_t  p_dest ) ;  ///< store a byte
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  bool  store_16 ( uint16_t  p_dest ) ;  ///< store 16 bits uint
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  bool  store_32 ( uint32_t  p_dest ) ;  ///< store 32 bits uint
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  bool  store_64 ( uint64_t  p_dest ) ;  ///< store 64 bits uint
 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-06-15 21:21:43 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  bool  store_half ( float  p_dest ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  bool  store_float ( float  p_dest ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  bool  store_double ( double  p_dest ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  bool  store_real ( real_t  p_real ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-06-15 21:21:43 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  bool  store_string ( const  String  & p_string ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  bool  store_line ( const  String  & p_line ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									virtual  bool  store_csv_line ( const  Vector < String >  & p_values ,  const  String  & p_delim  =  " , " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-06-15 21:21:43 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  bool  store_pascal_string ( const  String  & p_string ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-03-13 22:57:24 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  String  get_pascal_string ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-06-15 21:21:43 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  bool  store_buffer ( const  uint8_t  * p_src ,  uint64_t  p_length )  =  0 ;  ///< store an array of bytes, needs to be overwritten by children.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									bool  store_buffer ( const  Vector < uint8_t >  & p_buffer ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-05 13:01:31 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-06-15 21:21:43 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									bool  store_var ( const  Variant  & p_var ,  bool  p_full_objects  =  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2016-03-09 00:00:52 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-02-16 15:25:32 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  void  close ( )  =  0 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  bool  file_exists ( const  String  & p_name )  =  0 ;  ///< return true if a file exists
 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  Error  reopen ( const  String  & p_path ,  int  p_mode_flags ) ;  ///< does not change the AccessType
 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-03-23 11:08:58 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  Ref < FileAccess >  create ( AccessType  p_access ) ;  /// Create a file access (for the current platform) this is the only portable way of accessing files.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  Ref < FileAccess >  create_for_path ( const  String  & p_path ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  Ref < FileAccess >  open ( const  String  & p_path ,  int  p_mode_flags ,  Error  * r_error  =  nullptr ) ;  /// Create a file access (for the current platform) this is the only portable way of accessing files.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-21 15:02:08 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  Ref < FileAccess >  create_temp ( int  p_mode_flags ,  const  String  & p_prefix  =  " " ,  const  String  & p_extension  =  " " ,  bool  p_keep  =  false ,  Error  * r_error  =  nullptr ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-05 13:01:31 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-11-07 12:32:02 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  Ref < FileAccess >  open_encrypted ( const  String  & p_path ,  ModeFlags  p_mode_flags ,  const  Vector < uint8_t >  & p_key ,  const  Vector < uint8_t >  & p_iv  =  Vector < uint8_t > ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-05 13:01:31 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  Ref < FileAccess >  open_encrypted_pass ( const  String  & p_path ,  ModeFlags  p_mode_flags ,  const  String  & p_pass ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  Ref < FileAccess >  open_compressed ( const  String  & p_path ,  ModeFlags  p_mode_flags ,  CompressionMode  p_compress_mode  =  COMPRESSION_FASTLZ ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  Error  get_open_error ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									static  CreateFunc  get_create_func ( AccessType  p_access ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  bool  exists ( const  String  & p_name ) ;  ///< return true if a file exists
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  uint64_t  get_modified_time ( const  String  & p_file ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-08 09:53:41 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  BitField < FileAccess : : UnixPermissionFlags >  get_unix_permissions ( const  String  & p_file ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  Error  set_unix_permissions ( const  String  & p_file ,  BitField < FileAccess : : UnixPermissionFlags >  p_permissions ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  bool  get_hidden_attribute ( const  String  & p_file ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  Error  set_hidden_attribute ( const  String  & p_file ,  bool  p_hidden ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  bool  get_read_only_attribute ( const  String  & p_file ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  Error  set_read_only_attribute ( const  String  & p_file ,  bool  p_ro ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-10-07 10:57:21 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  void  set_backup_save ( bool  p_enable )  {  backup_save  =  p_enable ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  bool  is_backup_save_enabled ( )  {  return  backup_save ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  String  get_md5 ( const  String  & p_file ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  String  get_sha256 ( const  String  & p_file ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2017-12-27 15:21:18 -03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  String  get_multiple_md5 ( const  Vector < String >  & p_file ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-11-21 15:04:01 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  Vector < uint8_t >  get_file_as_bytes ( const  String  & p_path ,  Error  * r_error  =  nullptr ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2020-04-02 01:20:12 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  String  get_file_as_string ( const  String  & p_path ,  Error  * r_error  =  nullptr ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-10-01 00:17:00 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  PackedByteArray  _get_file_as_bytes ( const  String  & p_path )  {  return  get_file_as_bytes ( p_path ,  & last_file_open_error ) ;  } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									static  String  _get_file_as_string ( const  String  & p_path )  {  return  get_file_as_string ( p_path ,  & last_file_open_error ) ;  } 
							 
						 
					
						
							
								
									
										
										
										
											2022-11-21 15:04:01 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-03-07 20:29:49 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									template  < typename  T > 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									static  void  make_default ( AccessType  p_access )  { 
							 
						 
					
						
							
								
									
										
										
										
											2017-03-05 16:44:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										create_func [ p_access ]  =  _create_builtin < T > ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-10-21 15:02:08 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								public :  
						 
					
						
							
								
									
										
										
										
											2020-05-12 17:01:17 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									FileAccess ( )  { } 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-21 15:02:08 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									virtual  ~ FileAccess ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2014-02-09 22:10:30 -03:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								} ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-09-05 13:01:31 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								VARIANT_ENUM_CAST ( FileAccess : : CompressionMode ) ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								VARIANT_ENUM_CAST ( FileAccess : : ModeFlags ) ;  
						 
					
						
							
								
									
										
										
										
											2023-08-08 09:53:41 +03:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								VARIANT_BITFIELD_CAST ( FileAccess : : UnixPermissionFlags ) ;  
						 
					
						
							
								
									
										
										
										
											2022-09-05 13:01:31 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-03-25 11:10:34 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# endif  // FILE_ACCESS_H