NAME
get_fd_name - Gets the name of a file or device associated with a stream
SYNOPSIS
#include "l/l_sys_io.h"
Example compile flags (system dependent):
-DLINUX_386 -DLINUX_386_P4
-I/home/kobus/include
-L/home/kobus/load/linux_386_p4 -L/usr/local/lib -L/usr/lib
-lKJB -llapack -lblas -lg2c -lXext -lX11
int get_fd_name
(
int des,
char *fd_name,
size_t max_len
);
DESCRIPTION
The name of the file or device associated with descripter des is copied into
the buffer fd_name. Max_len gives the size of the buffer which will not be
overflowed. The name returned is the "real" name of the file, and thus
"~", "../", etc are expanded. Also, if the file was uncompressed behind the
scenes, then the uncompressed version is provided. The routine
get_user_fd_name can be used to find the name of the file as passed to
kjb_fopen.
RETURNS
On failure an error message is set, and ERROR is returned. Otherwise
NO_ERROR is retuned.
NOTE
The file must have been opened with kjb_fopen.
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Kobus Barnard
DOCUMENTOR
Kobus Barnard
SEE ALSO
kjb_read_exact
,
kjb_read
,
kjb_read_2
,
safe_pipe_write
,
kjb_write
,
kjb_write_2
,
kjb_fread_exact
,
kjb_fread
,
kjb_fread_2
,
kjb_fwrite
,
kjb_fwrite_2
,
kjb_fflush
,
kjb_ioctl
,
set_blocking
,
set_no_blocking
,
fget_line
,
dget_line
,
fput_line
,
kjb_mkdir
,
kjb_mkdir_2
,
kjb_unlink
,
kjb_unlink_2
,
kjb_rmdir
,
kjb_fopen
,
kjb_freopen
,
kjb_fdopen
,
kjb_fclose
,
kjb_realpath
,
get_user_fd_name
,
kjb_fseek
,
kjb_ftell
,
kjb_fputs
,
kjb_fgetc
,
kjb_fputc
,
pso
,
p_stderr
,
kjb_fprintf
,
pdo
,
kjb_vfprintf
,
is_file
,
is_directory
,
fp_get_path_type
,
get_path_type
,
get_file_size
,
fp_get_byte_size
,
get_file_age
,
get_file_mod_time
,
print_underlined
,
start_stdout_shadow
,
stop_stdout_shadow
,
start_stderr_shadow
,
stop_stderr_shadow
,
kjb_glob
,
kjb_simple_glob