print file info argument: Display directory or file information (SQL administration API)

Use the print file info argument with the admin() or task() function to display information about a directory or a file

Syntax


1  EXECUTE FUNCTION
1 admin
1 task
2  ( "print file info" , " file_path "
2  ) ;
Element Purpose Key considerations
file_path The path to the directory or file

Example: File information

The following example shows the argument you would use to print information about the x file that is in the /tmp directory:

execute function task("print file info","/tmp/x"):

The following information is returned:


(expression)  File name          = /tmp/x
              Is File            = 1
              Is Directory       = 0
              Is Raw Device      = 0
              Is Block Device    = 0
              Is Pipe            = 0
              File Size          = 554
              Last Access Time   = 11/29/2010 21:55:02
              Last Modified Time = 11/29/2010 21:51:45
              Status Change Time = 11/29/2010 21:51:45
              User Id            = 200
              Group id           = 102
              File Flags         = 33206

Example: Directory information

The following example shows the argument that you would use to print information about the /tmp directory:

execute function task("print file info","/tmp"):

The following information is returned:


(expression)  File name          = /tmp
              Is File            = 0
              Is Directory       = 1
              Is Raw Device      = 0
              Is Block Device    = 0
              Is Pipe            = 0
              File Size          = 32768
              Last Access Time   = 12/06/2010 11:53:00
              Last Modified Time = 12/06/2010 12:05:53
              Status Change Time = 12/06/2010 12:05:53
              User Id            = 0
              Group id           = 0
              File Flags         = 17407