local K=script.Parent local d=K.Parent local D=require(d.LuauPolyfill)local A=D.Error local function k()local K,d=pcall(function()return _G.__MOCK_FILE_SYSTEM__ or game:GetService("\070\105\108\101\083\121\115\116\101\109\083\101\114\118\105\099\101")end)if not K then error(A.new("\065\116\116\101\109\112\116\105\110\103 \116\111 \115\097\118\101 \115\110\097\112\115\104\111\116\115 \105\110 \097\110 \101\110\118\105\114\111\110\109\101\110\116 \119\104\101\114\101 \070\105\108\101\083\121\115\116\101\109\083\101\114\118\105\099\101 \105\115 \105\110\097\099\099\101\115\115\105\098\108\101\046"))end return d end return k
--[[
	* Copyright (c) Roblox Corporation. All rights reserved.
	* Licensed under the MIT License (the "License");
	* you may not use this file except in compliance with the License.
	* You may obtain a copy of the License at
	*
	*     https://opensource.org/licenses/MIT
	*
	* Unless required by applicable law or agreed to in writing, software
	* distributed under the License is distributed on an "AS IS" BASIS,
	* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	* See the License for the specific language governing permissions and
	* limitations under the License.
]]
-- NOTE: no upstream

local CurrentModule = script.Parent
local Packages = CurrentModule.Parent
local LuauPolyfill = require(Packages.LuauPolyfill)
local Error = LuauPolyfill.Error

local function getFileSystemService()
	local success, result = pcall(function()
		return _G.__MOCK_FILE_SYSTEM__ or game:GetService("FileSystemService")
	end)

	if not success then
		error(Error.new("Attempting to save snapshots in an environment where FileSystemService is inaccessible."))
	end

	return result
end

return getFileSystemService
