PlaceReader

Up and coming: shot check knows this class and its members today, and programs run it once the native runtime lands.

ShotInstancenot creatablecomingRoblox

Up and coming

Ask a place the same questions every time: find, tree, inspect, grep and outline.

PlaceReader is the base of PlaceFile: the reads a program makes of a place's instances and scripts. On a file they run locally in milliseconds, with nothing else open, and none of them ever changes anything.

Passes shot check todayLuau
local function example(x : PlaceReader)
	local hits, why = x:FindAsync({ Class = "Script", Limit = 5 })
	print(hits and #hits, why)
end

Methods

NameArgumentsReturnsDescription
FindAsync
yields
(query: { Name: string?, Exact: boolean?, Class: string?, Attribute: string?, Tag: string?, Root: string?, Limit: number? })({ InstanceInfo }?, string?)Finds instances by name, class, attribute or tag under a root, and returns each one's path, name and class.
TreeAsync
yields
(root: string?, depth: number?, options: { Attributes: boolean?, Limit: number? }?)(string?, string?)Returns a subtree as text, one line per instance with its class, tags and attributes, identical siblings folded as xN.
InspectAsync
yields
(path: string, all: boolean?)(InstanceDetails?, string?)Returns the properties that differ from a new instance of its class (all: every readable one), then attributes, tags and children.
GrepAsync
yields
(text: string, options: { Root: string?, Pattern: boolean?, NoCase: boolean?, Limit: number? }?)({ GrepHit }?, string?)Searches every script for text or a pattern, with no cap, and returns each hit's path, line and text.
ReadScriptAsync
yields
(path: string)(string?, string?)
OutlineAsync
yields
(path: string)({ OutlineItem }?, string?)Lists a script's classes, fields and functions with their line numbers.
From ShotInstance 33