Skip to main content

CanWriteFiles

Description

Check if files can be written.

If this returns false, then any functions that open files for writing or write files will fail. As of now, file writing is only disabled once a server is connected to so that client scripts sent by servers cannot write files.

function CanWriteFiles() --[[ ... ]] end

Parameters

None.

Return Values

  • allowed: boolean - true if files can be written, false otherwise.

Example

if CanWriteFiles() then
print('Files can be written')
else
print('Files cannot be written')
end

See Also