SEToolbox.Models.SelectWorldModel.LoadSession C# (CSharp) Method

LoadSession() static private method

static private LoadSession ( string savePath ) : WorldResource
savePath string
return WorldResource
        internal static WorldResource LoadSession(string savePath)
        {
            if (Directory.Exists(savePath))
            {
                var userPath = Path.GetDirectoryName(savePath);

                var saveResource = new WorldResource
                {
                    Savename = Path.GetFileName(savePath),
                    UserName = Path.GetFileName(userPath),
                    Savepath = savePath,
                    DataPath = UserDataPath.FindFromSavePath(savePath)
                };

                saveResource.LoadCheckpoint();

                return saveResource;
            }

            return null;
        }