|
| iMatix home page | << | < | > | >> |
SFLVersion 2.11 |
#include "sfldir.h"
char *
format_dir (
DIRST *dir,
Bool full)
Formats the directory entry information using the same conventions as the UNIX 'ls -l' command. Returns a static buffer that contains the the formatted string. If the full argument is TRUE, adds cosmetic hints to indicate the file type; for instance '/' if the file is a directory, '*' if it is executable.
{
static char
buffer [LINE_MAX]; /* Formatted directory entry */
ASSERT (dir != NULL);
snprintf (buffer, sizeof (buffer),
"%s %3d %-8.8s %-8.8s %8ld %s %s",
format_mode (dir),
dir-> file_nlink,
dir-> owner,
dir-> group,
(long) dir-> file_size,
format_time (dir),
format_name (dir, full)
);
return (buffer);
}
| | << | < | > | >> |
|