Commands

SHOW FILES

The SHOW FILES command returns a list of files within a schema.

Lists the files for which you have access privileges. You can use this command to list files in the current schema, a specified schema, or across your entire container.

The output includes file metadata and properties, ordered lexicographically by directory, schema, and file name. If you plan to filter the results, be aware that filters are applied to this ordered output.

Syntax

SHOW FILES [ FROM directory_name | IN directory_name ];

Parameters

[ FROM <directory_name> ]
Optionally specifies the directory scope for the command. When omitted, the command lists files in the current directory at /data. When specified, the command lists files from the given directory.

[ IN <directory_name> ]
Optionally specifies the directory scope for the command. This clause is functionally equivalent to FROM and is provided for syntactic flexibility.

The <directory_name> may be fully qualified to scope the results to a specific filesystem location.

Output

The command output provides table properties and metadata in the following columns:

ColumnDescription
nameName of the file or directory.
isDirectoryIndicates whether the entry is a directory (true) or not (false).
isFileIndicates whether the entry is a file (true) or not (false).
lengthSize of the file in bytes. For directories, this value may be 0 or implementation-defined.
ownerUser that owns the file or directory.
groupGroup associated with the file or directory.
permissionsAccess permissions for the file or directory, typically expressed in POSIX notation.
accessTimeTimestamp of the most recent access to the file or directory.
modificationTimeTimestamp of the most recent modification to the file or directory.

Usage notes

  • SHOW FILES lists files and directories that Metaform can access in the context of the current session and configured filesystem at /data.
  • The command returns only objects for which the user has sufficient access privileges. Objects that exist but are not accessible to the current user are not included in the output.
  • If no directory is specified, the command lists files in the current working directory.
  • Both files and directories are returned. Use the isFile and isDirectory columns in the output to distinguish between them.
  • The output is ordered lexicographically by directory and file name. When filtering results, be aware that filters are applied to this ordered output.
  • File metadata (such as ownership, permissions, and timestamps) is reported by the underlying filesystem and may vary depending on the filesystem type and cluster security configuration.
  • Some output columns may be unavailable or contain implementation-specific values, depending on the filesystem in use.
We’re actively preparing more detailed documentation and will be adding it here shortly.