namespace Sandbox;
public static partial class Storage
{
///
/// Create a new storage entry of the given type.
///
/// A name to categorize this type as. For example "dupe" or "save"
/// A new Entry
public static Entry CreateEntry( string type )
{
return new Entry( type );
}
///
/// Create a storage entry from an existing filesystem. This is used when downloading workshop entries.
///
internal static Entry CreateEntryFromFileSystem( BaseFileSystem fs )
{
try
{
return new Entry( fs );
}
catch ( System.Exception e )
{
Log.Warning( e, "Exception when creating StorageContent from workshop" );
return null;
}
}
///
/// This is what is saved to the .meta file
///
internal class StorageMeta
{
public string Id { get; set; }
public string Type { get; set; }
public DateTimeOffset Timestamp { get; set; }
public Dictionary Meta { get; set; }
}
///
/// This matches ERemoteStoragePublishedFileVisibility in native
///
public enum Visibility
{
Public = 0,
FriendsOnly = 1,
Private = 2,
Unlisted = 3,
}
}