Home Contents | # filer:cleanup | Filer | Core4 Lua Commands

## SYNOPSIS

path = filer:cleanup(file[, mode[, lang | nil]])

## DESCRIPTION

Cleans up the passed file into a full path using the lookup rules that the filer was configured for.

If mode is not given or "read", this function does the same as filer:lookup(). The lang value is only used in this mode.

For other modes, file must be an absolute path.

The mode "write" verifies that the file is inside the path and writable.

The mode "create" checks that the directory of file is inside the path and writable. It is ok if the file already exists.

## RETURN VALUE

Returns the full path of the file. It returns nil if the file access was denied.

## SEE ALSO

filer.new, filer:lookup