homy-game-studio / hgs-unity-local-storage Goto Github PK
View Code? Open in Web Editor NEWGerencie arquivos e cache de forma segura em sua aplicação.
License: MIT License
Gerencie arquivos e cache de forma segura em sua aplicação.
License: MIT License
cacheStorage.Invlidate();
throws DirectoryNotFoundException
when the directory not exists yet.
If the directory is not found, cacheStorage.Invlidate();
shold be ignored.
DirectoryNotFoundException: Could not find a part of the path "C:/Users/Matheus Moura/AppData/LocalLow/Homy Game Studio/Tower Stacker/pictures/b7286587de4425770717ffdac19fa1faa360fdeb5b5cb07676ecf492e2d121d4".
System.IO.File.Delete (System.String path) (at <695d1cc93cca45069c528c15c9fdd749>:0)
HGS.LocalStorage.Utils.FileUtility.Delete (System.String path) (at Library/PackageCache/com.hgs.local-storage@1a34572c28/Runtime/Scripts/Utils/FileUtility.cs:34)
HGS.LocalStorage.CacheStorage.InvalidateFile (System.String path) (at Library/PackageCache/com.hgs.local-storage@1a34572c28/Runtime/Scripts/CacheStorage.cs:29)
HGS.LocalStorage.CacheStorage.Invalidate (System.String key) (at Library/PackageCache/com.hgs.local-storage@1a34572c28/Runtime/Scripts/CacheStorage.cs:16)
HGS.LocalStorage.CacheStorage.Exists (System.String key) (at Library/PackageCache/com.hgs.local-storage@1a34572c28/Runtime/Scripts/CacheStorage.cs:41)
HGS.TinyPuzzleToolkit.StateDrawers.SpriteDownloadStateDrawer.Draw () (at C:/Users/Matheus Moura/workspace/hgs/hgs-unity-tiny-puzzle-toolkit/Assets/Package/Runtime/Scripts/StateDrawers/SpriteDownloadStateDrawer.cs:44)
HGS.TinyPuzzleToolkit.StateDrawers.SpriteDownloadStateDrawer.OnEnable () (at C:/Users/Matheus Moura/workspace/hgs/hgs-unity-tiny-puzzle-toolkit/Assets/Package/Runtime/Scripts/StateDrawers/SpriteDownloadStateDrawer.cs:24)
``
Isn't possible remove single key. Like: storage.Delete("my-key")
Remove single key with
Storage storage;
storage.Delete("key-name" );
Samples are not showing in Unity Package Manager.
When CacheStorage
start, Invalidate()
throws DirectoryNotFoundException
because directory not created yet.
Check if directory exists after file invalidation.
DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Matheus Moura\AppData\LocalLow\Homy Game Studio\Kong Climber\pictures'.
System.IO.__Error.WinIOError (System.Int32 errorCode, System.String maybeFullPath) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.FileSystemEnumerableIterator`1[TSource].HandleError (System.Int32 hr, System.String path) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.FileSystemEnumerableIterator`1[TSource].CommonInit () (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.FileSystemEnumerableIterator`1[TSource]..ctor (System.String path, System.String originalUserPath, System.String searchPattern, System.IO.SearchOption searchOption, System.IO.SearchResultHandler`1[TSource] resultHandler, System.Boolean checkHost) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.FileSystemEnumerableFactory.CreateFileNameIterator (System.String path, System.String originalUserPath, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption, System.Boolean checkHost) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.Directory.InternalGetFileDirectoryNames (System.String path, System.String userPathOriginal, System.String searchPattern, System.Boolean includeFiles, System.Boolean includeDirs, System.IO.SearchOption searchOption, System.Boolean checkHost) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.Directory.InternalGetFiles (System.String path, System.String searchPattern, System.IO.SearchOption searchOption) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.IO.Directory.GetFiles (System.String path) (at <695d1cc93cca45069c528c15c9fdd749>:0)
HGS.LocalStorage.Utils.FileUtility.GetFiles (System.String folder) (at Library/PackageCache/com.hgs.local-storage@ed17f3ba6f/Runtime/Scripts/Utils/FileUtility.cs:29)
HGS.LocalStorage.CacheStorage.OnEnable () (at Library/PackageCache/com.hgs.local-storage@ed17f3ba6f/Runtime/Scripts/CacheStorage.cs:35)
Same problem of #12
Expected:
struct UserData
{
public string displayName;
public int score;
}
var input = new Userdata
{
displayName: "Joaquim",
score: 10
}
storage.WriteObject("user", input);
var user = storage.ReadObject<UserData>("user")
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.