SHARE
TWEET

Untitled

exbdcd Jun 29th, 2020 (edited) 1,071 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Псевдокод проверки на существование кэша игры
  2.  
  3. bool FILE_EXISTS(filePath);
  4. bool DIRECTORY_EXISTS(dirPath);
  5.  
  6. bool IsFullCacheExists()
  7. {
  8.     if
  9.     (
  10.         FILE_EXISTS("Android/obb/com.rockstargames.gtasa/main.8.com.rockstargames.gtasa.obb")
  11.         &&           
  12.         FILE_EXISTS("Android/obb/com.rockstargames.gtasa/patch.8.com.rockstargames.gtasa.obb")
  13.     )
  14.     return true;
  15.  
  16.     return false;
  17. }
  18.  
  19. bool IsLiteCacheExists()
  20. {
  21.     if
  22.     (
  23.         DIRECTORY_EXISTS("Android/data/com.rockstargames.gtasa/files/anim")
  24.         &&
  25.         DIRECTORY_EXISTS("Android/data/com.rockstargames.gtasa/files/audio")
  26.         &&
  27.         DIRECTORY_EXISTS("Android/data/com.rockstargames.gtasa/files/data")
  28.         &&
  29.         DIRECTORY_EXISTS("Android/data/com.rockstargames.gtasa/files/models")
  30.         &&
  31.         DIRECTORY_EXISTS("Android/data/com.rockstargames.gtasa/files/texdb")
  32.     )
  33.     return true;
  34.  
  35.     return false;
  36. }
  37.  
  38. // Usage:
  39.  
  40. if( IsLiteCacheExists() || IsFullCacheExists() )
  41.     ShowConfirmWindow();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top