• Manual
  • API Documentation
  • Bayat.SaveSystem.Storage
  • LocalDiskStorage

    Show / Hide Table of Contents
    • Bayat
      • UnityThread
    • Bayat.Core
      • AddReferenceWindow
      • AddReferenceWindow.Dependency
      • AssetReferenceResolver
      • AssetReferenceResolverEditor
      • BayatEditorStyles
      • CoreAssetPostProcessor
      • EditorApplicationUtility
      • MaterialPropertiesResolver
      • MaterialPropertiesResolverEditor
      • ReferenceCheckerWindow
      • ReferenceResolverMode
      • RuntimeMaterialProperties
      • RuntimeMaterialProperty
      • RuntimeMaterialPropertyType
      • SceneReferenceResolver
      • SceneReferenceResolverEditor
      • UnityEditorInternalException
    • Bayat.Core.EditorWindows
      • AssetReferenceManagerWindow
      • AssetReferenceManagerWindow.Styles
      • DatabaseMigrationWindow
      • DatabaseMigrationWindow.SceneMigrationStatus
      • DatabaseMigrationWindow.Styles
      • EditorWindowExtensions
      • EditorWindowUtility
      • EditorWindowWrapper
      • SceneReferenceManagerWindow
      • SceneReferenceManagerWindow.Styles
      • WindowClose
      • WrappedEditorWindow
    • Bayat.Core.Profiling
      • ProfiledSegment
      • ProfiledSegmentCollection
      • ProfilingScope
      • ProfilingUtility
    • Bayat.Core.Reflection
      • AssemblyExtensions
      • Codebase
      • RuntimeCodebase
      • TypeExtensions
      • TypeUtility
    • Bayat.Core.Text
      • StringExtensions
      • StringUtility
    • Bayat.Core.Utilities
      • ExceptionExtensions
      • GuidToReferenceDictionary
      • SerializableDictionary<TKey, TVal>
    • Bayat.Json
      • ConstructorHandling
      • CreateObjectConverterWindow
      • CreateObjectConverterWindow.Styles
      • DateFormatHandling
      • DateParseHandling
      • DateTimeZoneHandling
      • DefaultValueHandling
      • FloatFormatHandling
      • FloatParseHandling
      • Formatting
      • GameObjectSerializationHandler
      • GameObjectSerializationManagerTreeView
      • GameObjectSerializationManagerTreeView.Styles
      • GameObjectSerializationManagerWindow
      • GameObjectSerializationManagerWindow.Styles
      • IArrayPool<T>
      • IJsonLineInfo
      • JsonArrayAttribute
      • JsonConstructorAttribute
      • JsonContainerAttribute
      • JsonContainerType
      • JsonConvert
      • JsonConverter
      • JsonConverterAttribute
      • JsonConverterCollection
      • JsonDefaultSettingsWindow
      • JsonDefaultSettingsWindow.Styles
      • JsonDictionaryAttribute
      • JsonException
      • JsonExtensionDataAttribute
      • JsonIgnoreAttribute
      • JsonObjectAttribute
      • JsonPosition
      • JsonPropertyAttribute
      • JsonReader
      • JsonReader.State
      • JsonReaderException
      • JsonRequiredAttribute
      • JsonSerializationException
      • JsonSerializer
      • JsonSerializerSettings
      • JsonSerializerSettingsPreset
      • JsonTextReader
      • JsonTextWriter
      • JsonToken
      • JsonWriter
      • JsonWriter.State
      • JsonWriterException
      • MemberSerialization
      • MetadataPropertyHandling
      • MissingMemberHandling
      • NullValueHandling
      • ObjectCreationHandling
      • PreserveReferencesHandling
      • ReadType
      • ReferenceLoopHandling
      • Required
      • StringEscapeHandling
      • TypeNameHandling
      • WriteState
    • Bayat.Json.Bson
      • BsonArray
      • BsonBinary
      • BsonBinaryType
      • BsonBinaryWriter
      • BsonObject
      • BsonObjectId
      • BsonProperty
      • BsonReader
      • BsonRegex
      • BsonString
      • BsonToken
      • BsonType
      • BsonValue
      • BsonWriter
    • Bayat.Json.Converters
      • AnimatorConverter
      • AudioClipConverter
      • BinaryConverter
      • BoundsConverter
      • BsonObjectIdConverter
      • ColliderConverter
      • ColorConverter
      • CustomCreationConverter<T>
      • DateTimeConverterBase
      • DiscriminatedUnionConverter
      • EntityKeyMemberConverter
      • ExpandoObjectConverter
      • GameObjectConverter
      • HashSetConverter
      • IsoDateTimeConverter
      • JavaScriptDateTimeConverter
      • KeyValuePairConverter
      • MaterialConverter
      • MaterialConverter.JsonSerializedMaterialProperty
      • Matrix4x4Converter
      • MeshConverter
      • MeshConverter.SerializedIndices
      • MeshFilterConverter
      • ObjectJsonConverter
      • QuaternionConverter
      • RectConverter
      • RectTransformConverter
      • RegexConverter
      • RendererConverter
      • ResolutionConverter
      • ShaderConverter
      • SpriteConverter
      • StringEnumConverter
      • Texture2DConverter
      • TransformConverter
      • UnityBehaviourConverter
      • UnityComponentConverter
      • UnityMonoBehaviourConverter
      • UnityObjectConverter
      • UriConverter
      • VectorConverter
      • VersionConverter
      • XmlNodeConverter
    • Bayat.Json.Linq
      • CommentHandling
      • Extensions
      • IJEnumerable<T>
      • JArray
      • JConstructor
      • JContainer
      • JEnumerable<T>
      • JObject
      • JProperty
      • JPropertyDescriptor
      • JPropertyKeyedCollection
      • JRaw
      • JsonLoadSettings
      • JsonMergeSettings
      • JToken
      • JTokenEqualityComparer
      • JTokenReader
      • JTokenType
      • JTokenWriter
      • JValue
      • LineInfoHandling
      • MergeArrayHandling
      • MergeNullValueHandling
    • Bayat.Json.Linq.JsonPath
      • ArrayIndexFilter
      • ArrayMultipleIndexFilter
      • ArraySliceFilter
      • BooleanQueryExpression
      • CompositeExpression
      • FieldFilter
      • FieldMultipleFilter
      • JPath
      • PathFilter
      • QueryExpression
      • QueryFilter
      • QueryOperator
      • ScanFilter
    • Bayat.Json.Serialization
      • CachedAttributeGetter<T>
      • CamelCasePropertyNamesContractResolver
      • DefaultContractResolver
      • DefaultContractResolver.EnumerableDictionaryWrapper<TEnumeratorKey, TEnumeratorValue>
      • DefaultContractResolverState
      • DefaultReferenceResolver
      • DefaultSerializationBinder
      • DefaultSerializationBinder.TypeNameKey
      • DiagnosticsTraceWriter
      • ErrorContext
      • ErrorEventArgs
      • ExpressionValueProvider
      • ExtensionDataGetter
      • ExtensionDataSetter
      • IAttributeProvider
      • IContractResolver
      • IReferenceResolver
      • ITraceWriter
      • IValueProvider
      • JsonArrayContract
      • JsonContainerContract
      • JsonContract
      • JsonContractType
      • JsonDictionaryContract
      • JsonDynamicContract
      • JsonFormatterConverter
      • JsonISerializableContract
      • JsonLinqContract
      • JsonObjectContract
      • JsonPrimitiveContract
      • JsonProperty
      • JsonPropertyCollection
      • JsonSerializerInternalBase
      • JsonSerializerProxy
      • JsonSerializerReader
      • JsonSerializerReader.CreatorPropertyContext
      • JsonSerializerReader.PropertyPresence
      • JsonSerializerWriter
      • JsonStringContract
      • JsonTypeReflector
      • MemoryTraceWriter
      • ObjectConstructor<T>
      • OnErrorAttribute
      • ReflectionAttributeProvider
      • ReflectionValueProvider
      • ResolverContractKey
      • SerializationCallback
      • SerializationErrorCallback
      • TraceJsonReader
      • TraceJsonWriter
    • Bayat.Json.Shims
      • PreserveAttribute
    • Bayat.Json.Utilities
      • Base64Encoder
      • BidirectionalDictionary<TFirst, TSecond>
      • BufferUtils
      • CollectionUtils
      • CollectionWrapper<T>
      • ConvertUtils
      • ConvertUtils.ConvertResult
      • ConvertUtils.TypeConvertKey
      • Creator<T>
      • DateTimeParser
      • DateTimeUtils
      • DictionaryWrapper<TKey, TValue>
      • DynamicProxy<T>
      • DynamicProxyMetaObject<T>
      • DynamicUtils
      • DynamicUtils.BinderWrapper
      • EnumUtils
      • EnumValue<T>
      • ExpressionReflectionDelegateFactory
      • FSharpFunction
      • FSharpUtils
      • ImmutableCollectionsUtils
      • ImmutableCollectionsUtils.ImmutableCollectionTypeInfo
      • IWrappedCollection
      • IWrappedDictionary
      • JavaScriptUtils
      • JsonTokenUtils
      • LateBoundReflectionDelegateFactory
      • MathUtils
      • MethodCall<T, TResult>
      • MiscellaneousUtils
      • NoThrowExpressionVisitor
      • NoThrowGetBinderMember
      • NoThrowSetBinderMember
      • ParseResult
      • ParserTimeZone
      • PrimitiveTypeCode
      • PropertyNameTable
      • ReflectionDelegateFactory
      • ReflectionMember
      • ReflectionObject
      • ReflectionUtils
      • StringBuffer
      • StringReference
      • StringReferenceExtensions
      • StringUtils
      • ThreadSafeStore<TKey, TValue>
      • TypeInformation
      • ValidationUtils
    • Bayat.SaveSystem
      • AutoSave
      • AutoSaveManager
      • AutoSaveManager.LoadEvent
      • AutoSaveManager.SaveEvent
      • AutoSaveManagerWindow
      • AutoSaveManagerWindow.Styles
      • LoadEventArgs
      • LoadIntoEventArgs
      • SaveEventArgs
      • SaveSystemAPI
      • SaveSystemDefaultSettingsWindow
      • SaveSystemDefaultSettingsWindow.Styles
      • SaveSystemEditorResources
      • SaveSystemJsonSerializer
      • SaveSystemManager
      • SaveSystemSettings
      • SaveSystemSettingsPreset
      • WelcomeWindow
      • WelcomeWindow.Styles
    • Bayat.SaveSystem.Security
      • ISaveSystemEncryption
      • SaveSystemCryptoStream
      • SaveSystemSymmetricCryptoStream
      • SaveSystemSymmetricEncryption
    • Bayat.SaveSystem.Storage
      • BuiltInConnectionFactory
      • ConnectionStringFactory
      • FileStorageStream
      • IConnectionFactory
      • IStorage
      • IStorageStream
      • LocalDiskStorage
      • PlayerPrefsStorage
      • PlayerPrefsStorageStream
      • StorageBackup
      • StorageBase
      • StorageClearOperationResult
      • StorageConnectionString
      • StorageCopyOperationResult
      • StorageDeleteOperationResult
      • StorageFactory
      • StorageFullException
      • StorageInvalidIdentifierException
      • StorageItemNotFoundException
      • StorageListOptions
      • StorageMetaData
      • StorageMoveOperationResult
      • StorageOperationResult
      • StorageStream

    Class LocalDiskStorage

    Local disk file storage implementation.

    Inheritance
    System.Object
    StorageBase
    LocalDiskStorage
    Implements
    IStorage
    Inherited Members
    StorageBase.DefaultTextEncodingName
    StorageBase.textEncoding
    StorageBase.useMetaData
    StorageBase.useCatalog
    StorageBase.TextEncoding
    StorageBase.UseMetaData
    StorageBase.UseCatalog
    StorageBase.BackupSuffix
    StorageBase.MetaSuffix
    StorageBase.CatalogIdentifier
    StorageBase.CommitWriteStream(IStorageStream)
    StorageBase.WriteAllText(String, String)
    StorageBase.WriteAllBytes(String, Byte[])
    StorageBase.Delete(String)
    StorageBase.Move(String, String, Boolean)
    StorageBase.Copy(String, String, Boolean)
    StorageBase.UpdateMetaData(String, Boolean, Boolean)
    StorageBase.SaveMetaData(String, StorageMetaData)
    StorageBase.LoadMetaData(String)
    StorageBase.DeleteMetaData(String)
    StorageBase.HasMetaData(String)
    StorageBase.GetMetaIdentifier(String)
    StorageBase.IsMetaIdentifier(String)
    StorageBase.SaveCatalog(List<String>)
    StorageBase.LoadCatalog()
    StorageBase.AddToCatalog(String)
    StorageBase.RemoveFromCatalog(String)
    StorageBase.RenameInCatalog(String, String)
    StorageBase.IsCatalogIdentifier(String)
    StorageBase.CreateBackup(String)
    StorageBase.RestoreLatestBackup(String)
    StorageBase.GetLatestBackup(String)
    StorageBase.RestoreBackup(String, StorageBackup)
    StorageBase.GetBackups(String)
    StorageBase.DeleteBackup(String, StorageBackup)
    StorageBase.DeleteBackups(String)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Bayat.SaveSystem.Storage
    Assembly: Bayat.SaveSystem.Runtime.dll
    Syntax
    public class LocalDiskStorage : StorageBase, IStorage

    Constructors

    | Improve this Doc View Source

    LocalDiskStorage(String)

    Declaration
    public LocalDiskStorage(string basePath)
    Parameters
    Type Name Description
    System.String basePath

    Fields

    | Improve this Doc View Source

    basePath

    Declaration
    protected string basePath
    Field Value
    Type Description
    System.String

    Properties

    | Improve this Doc View Source

    BasePath

    The base path.

    Declaration
    public virtual string BasePath { get; set; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    TemporarySuffix

    Declaration
    public virtual string TemporarySuffix { get; }
    Property Value
    Type Description
    System.String

    Methods

    | Improve this Doc View Source

    Clear()

    Declaration
    public override async Task<StorageClearOperationResult> Clear()
    Returns
    Type Description
    System.Threading.Tasks.Task<StorageClearOperationResult>
    Overrides
    StorageBase.Clear()
    | Improve this Doc View Source

    CommitWriteStreamInternal(IStorageStream)

    Declaration
    protected override Task CommitWriteStreamInternal(IStorageStream stream)
    Parameters
    Type Name Description
    IStorageStream stream
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    StorageBase.CommitWriteStreamInternal(IStorageStream)
    | Improve this Doc View Source

    CopyInternal(String, String, Boolean)

    Declaration
    protected override async Task<StorageCopyOperationResult> CopyInternal(string fromIdentifier, string toIdentifier, bool replace)
    Parameters
    Type Name Description
    System.String fromIdentifier
    System.String toIdentifier
    System.Boolean replace
    Returns
    Type Description
    System.Threading.Tasks.Task<StorageCopyOperationResult>
    Overrides
    StorageBase.CopyInternal(String, String, Boolean)
    | Improve this Doc View Source

    DeleteInternal(String)

    Declaration
    protected override Task<StorageDeleteOperationResult> DeleteInternal(string identifier)
    Parameters
    Type Name Description
    System.String identifier
    Returns
    Type Description
    System.Threading.Tasks.Task<StorageDeleteOperationResult>
    Overrides
    StorageBase.DeleteInternal(String)
    | Improve this Doc View Source

    Exists(String)

    Declaration
    public override Task<bool> Exists(string identifier)
    Parameters
    Type Name Description
    System.String identifier
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>
    Overrides
    StorageBase.Exists(String)
    | Improve this Doc View Source

    GetAbsolutePath(String)

    Gets the absolute path for the specified identifier using the base path.

    Declaration
    public virtual string GetAbsolutePath(string identifier)
    Parameters
    Type Name Description
    System.String identifier

    The item identifier

    Returns
    Type Description
    System.String

    The absolute path to the file

    | Improve this Doc View Source

    GetReadStream(String)

    Declaration
    public override Task<IStorageStream> GetReadStream(string identifier)
    Parameters
    Type Name Description
    System.String identifier
    Returns
    Type Description
    System.Threading.Tasks.Task<IStorageStream>
    Overrides
    StorageBase.GetReadStream(String)
    | Improve this Doc View Source

    GetRelativePath(String, String)

    Creates a relative path from one file or folder to another.

    Declaration
    public static string GetRelativePath(string fromPath, string toPath)
    Parameters
    Type Name Description
    System.String fromPath

    Contains the directory that defines the start of the relative path.

    System.String toPath

    Contains the path that defines the endpoint of the relative path.

    Returns
    Type Description
    System.String

    The relative path from the start directory to the end path or toPath if the paths are not related.

    Exceptions
    Type Condition
    System.ArgumentNullException
    System.UriFormatException
    System.InvalidOperationException
    | Improve this Doc View Source

    GetWriteStream(String)

    Declaration
    public override Task<IStorageStream> GetWriteStream(string identifier)
    Parameters
    Type Name Description
    System.String identifier
    Returns
    Type Description
    System.Threading.Tasks.Task<IStorageStream>
    Overrides
    StorageBase.GetWriteStream(String)
    | Improve this Doc View Source

    List(String, StorageListOptions)

    Declaration
    public override Task<string[]> List(string identifier, StorageListOptions options)
    Parameters
    Type Name Description
    System.String identifier
    StorageListOptions options
    Returns
    Type Description
    System.Threading.Tasks.Task<System.String[]>
    Overrides
    StorageBase.List(String, StorageListOptions)
    | Improve this Doc View Source

    ListAll()

    Declaration
    public override Task<string[]> ListAll()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.String[]>
    Overrides
    StorageBase.ListAll()
    | Improve this Doc View Source

    MoveInternal(String, String, Boolean)

    Declaration
    protected override async Task<StorageMoveOperationResult> MoveInternal(string oldIdentifier, string newIdentifier, bool replace)
    Parameters
    Type Name Description
    System.String oldIdentifier
    System.String newIdentifier
    System.Boolean replace
    Returns
    Type Description
    System.Threading.Tasks.Task<StorageMoveOperationResult>
    Overrides
    StorageBase.MoveInternal(String, String, Boolean)
    | Improve this Doc View Source

    ReadAllBytes(String)

    Declaration
    public override Task<byte[]> ReadAllBytes(string identifier)
    Parameters
    Type Name Description
    System.String identifier
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Byte[]>
    Overrides
    StorageBase.ReadAllBytes(String)
    | Improve this Doc View Source

    ReadAllText(String)

    Declaration
    public override Task<string> ReadAllText(string identifier)
    Parameters
    Type Name Description
    System.String identifier
    Returns
    Type Description
    System.Threading.Tasks.Task<System.String>
    Overrides
    StorageBase.ReadAllText(String)
    | Improve this Doc View Source

    WriteAllBytesInternal(String, Byte[])

    Declaration
    protected override Task WriteAllBytesInternal(string identifier, byte[] data)
    Parameters
    Type Name Description
    System.String identifier
    System.Byte[] data
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    StorageBase.WriteAllBytesInternal(String, Byte[])
    | Improve this Doc View Source

    WriteAllTextInternal(String, String)

    Declaration
    protected override Task WriteAllTextInternal(string identifier, string data)
    Parameters
    Type Name Description
    System.String identifier
    System.String data
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    StorageBase.WriteAllTextInternal(String, String)

    Implements

    IStorage
    • Improve this Doc
    • View Source
    • 0 Comments
    In This Article
    • Constructors
      • LocalDiskStorage(String)
    • Fields
      • basePath
    • Properties
      • BasePath
      • TemporarySuffix
    • Methods
      • Clear()
      • CommitWriteStreamInternal(IStorageStream)
      • CopyInternal(String, String, Boolean)
      • DeleteInternal(String)
      • Exists(String)
      • GetAbsolutePath(String)
      • GetReadStream(String)
      • GetRelativePath(String, String)
      • GetWriteStream(String)
      • List(String, StorageListOptions)
      • ListAll()
      • MoveInternal(String, String, Boolean)
      • ReadAllBytes(String)
      • ReadAllText(String)
      • WriteAllBytesInternal(String, Byte[])
      • WriteAllTextInternal(String, String)
    • Implements