Beispiel #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!");
            }
        }
Beispiel #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
     { }
 }
Beispiel #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!");
         }
     }
 }
Beispiel #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
     {
     }
 }
Beispiel #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
        }
Beispiel #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
        }
 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
         {
         }
     }
 }