mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	file_util: Use a u64 to represent number of entries
This avoids a truncating cast on size. I doubt we'd ever traverse a directory this large, however we also shouldn't truncate sizes away.
This commit is contained in:
		
							parent
							
								
									cc6cb45536
								
							
						
					
					
						commit
						df5069f8c0
					
				
					 3 changed files with 14 additions and 14 deletions
				
			
		|  | @ -85,7 +85,7 @@ bool CreateEmptyFile(const std::string& filename); | |||
|  * @return whether handling the entry succeeded | ||||
|  */ | ||||
| using DirectoryEntryCallable = std::function<bool( | ||||
|     unsigned* num_entries_out, const std::string& directory, const std::string& virtual_name)>; | ||||
|     u64* num_entries_out, const std::string& directory, const std::string& virtual_name)>; | ||||
| 
 | ||||
| /**
 | ||||
|  * Scans a directory, calling the callback for each file/directory contained within. | ||||
|  | @ -96,7 +96,7 @@ using DirectoryEntryCallable = std::function<bool( | |||
|  * @param callback The callback which will be called for each entry | ||||
|  * @return whether scanning the directory succeeded | ||||
|  */ | ||||
| bool ForeachDirectoryEntry(unsigned* num_entries_out, const std::string& directory, | ||||
| bool ForeachDirectoryEntry(u64* num_entries_out, const std::string& directory, | ||||
|                            DirectoryEntryCallable callback); | ||||
| 
 | ||||
| /**
 | ||||
|  | @ -106,8 +106,8 @@ bool ForeachDirectoryEntry(unsigned* num_entries_out, const std::string& directo | |||
|  * @param recursion Number of children directories to read before giving up. | ||||
|  * @return the total number of files/directories found | ||||
|  */ | ||||
| unsigned ScanDirectoryTree(const std::string& directory, FSTEntry& parent_entry, | ||||
|                            unsigned int recursion = 0); | ||||
| u64 ScanDirectoryTree(const std::string& directory, FSTEntry& parent_entry, | ||||
|                       unsigned int recursion = 0); | ||||
| 
 | ||||
| // deletes the given directory and anything under it. Returns true on success.
 | ||||
| bool DeleteDirRecursively(const std::string& directory, unsigned int recursion = 256); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue