Пример #1
0
        internal static void SetupCacheFolder()
        {
            if (!HTTPCacheService.IsSupported)
            {
                return;
            }

            try
            {
                if (string.IsNullOrEmpty(CacheFolder) || string.IsNullOrEmpty(LibraryPath))
                {
                    CacheFolder = System.IO.Path.Combine(HTTPManager.GetRootCacheFolder(), "HTTPCache");
                    if (!Directory.Exists(CacheFolder))
                    {
                        Directory.CreateDirectory(CacheFolder);
                    }

                    LibraryPath = System.IO.Path.Combine(HTTPManager.GetRootCacheFolder(), "Library");
                }
            }
            catch
            {
                isSupported = false;

                HTTPManager.Logger.Warning("HTTPCacheService", "Cache Service Disabled!");
            }
        }
Пример #2
0
 internal static void SetupFolder()
 {
     try
     {
         if (string.IsNullOrEmpty(CookieFolder) || string.IsNullOrEmpty(LibraryPath))
         {
             CookieFolder = System.IO.Path.Combine(HTTPManager.GetRootCacheFolder(), "Cookies");
             LibraryPath  = System.IO.Path.Combine(CookieFolder, "Library");
         }
     }
     catch
     { }
 }
Пример #3
0
 private static void SetupFolder()
 {
     if (string.IsNullOrEmpty(LibraryPath))
     {
         try
         {
             LibraryPath = System.IO.Path.Combine(HTTPManager.GetRootCacheFolder(), "Hosts");
             HTTPManager.IOService.FileExists(LibraryPath);
             IsSaveAndLoadSupported = true;
         }
         catch
         {
             IsSaveAndLoadSupported = false;
             HTTPManager.Logger.Warning("HostManager", "Save and load Disabled!");
         }
     }
 }
Пример #4
0
 internal static void SetupCacheFolder()
 {
     try
     {
         if (string.IsNullOrEmpty(HTTPCacheService.CacheFolder) || string.IsNullOrEmpty(HTTPCacheService.LibraryPath))
         {
             HTTPCacheService.CacheFolder = Path.Combine(HTTPManager.GetRootCacheFolder(), "HTTPCache");
             if (!Directory.Exists(HTTPCacheService.CacheFolder))
             {
                 Directory.CreateDirectory(HTTPCacheService.CacheFolder);
             }
             HTTPCacheService.LibraryPath = Path.Combine(HTTPManager.GetRootCacheFolder(), "Library");
         }
     }
     catch
     {
     }
 }
Пример #5
0
        internal static void SetupCacheFolder()
        {
#if !UNITY_WEBPLAYER
            try
            {
                if (string.IsNullOrEmpty(CacheFolder) || string.IsNullOrEmpty(LibraryPath))
                {
                    CacheFolder = System.IO.Path.Combine(HTTPManager.GetRootCacheFolder(), "HTTPCache");
                    if (!Directory.Exists(CacheFolder))
                    {
                        Directory.CreateDirectory(CacheFolder);
                    }

                    LibraryPath = System.IO.Path.Combine(HTTPManager.GetRootCacheFolder(), "Library");
                }
            }
            catch
            { }
#endif
        }
Пример #6
0
        internal static void SetupFolder()
        {
#if !BESTHTTP_DISABLE_COOKIE_SAVE
            if (!CookieJar.IsSavingSupported)
            {
                return;
            }

            try
            {
                if (string.IsNullOrEmpty(CookieFolder) || string.IsNullOrEmpty(LibraryPath))
                {
                    CookieFolder = System.IO.Path.Combine(HTTPManager.GetRootCacheFolder(), "Cookies");
                    LibraryPath  = System.IO.Path.Combine(CookieFolder, "Library");
                }
            }
            catch
            { }
#endif
        }
Пример #7
0
 internal static void SetupCacheFolder()
 {
     if (IsSupported)
     {
         try
         {
             if (string.IsNullOrEmpty(CacheFolder) || string.IsNullOrEmpty(LibraryPath))
             {
                 CacheFolder = Path.Combine(HTTPManager.GetRootCacheFolder(), "VRCHTTPCache");
                 if (!Directory.Exists(CacheFolder))
                 {
                     Directory.CreateDirectory(CacheFolder);
                 }
                 LibraryPath = Path.Combine(HTTPManager.GetRootCacheFolder(), "VRCLibrary");
             }
         }
         catch
         {
         }
     }
 }