fileutils.c File Reference

#include <sys/stat.h>
#include <fcntl.h>
#include "globals.h"
#include "fileutils.h"

Functions


Function Documentation

off_t fd_file_length ( FILE *  fd  ) 

Gets the size of the specified file; returns EOF for error.

As file_length, but the file is specified by file handle, not name.

Parameters:
fd The file to size up.
Returns:
Size of file in bytes.
off_t fi_file_length ( int  fileno  ) 

Gets the size of the specified file; returns EOF for error.

As file_length, but the file is specified by number, not name.

See also:
file_length
Parameters:
fileno The file to size up.
Returns:
Size of file in bytes.
off_t file_length ( char *  filename  ) 

Gets the size of the specified file; returns EOF for error.

Parameters:
filename The file to size up.
Returns:
Size of file in bytes.

Referenced by attach_subcorpus(), comp_component_state(), and show_subcorpus_info().

long fprobe ( char *  fname  ) 

Gets the size of the specified file; returns EOF for error.

Duplicates functionality of file_length, but return is long instead of off_t.

See also:
file_length
Parameters:
fname The file to size up.
Returns:
Size of file in bytes.
int is_directory ( char *  path  ) 

Checks whether the specified path indicates a directory.

Parameters:
path Path to check.
Returns:
Boolean. (Also false if there's an error.)

Referenced by do_attribute().

int is_file ( char *  path  ) 

Checks whether the specified path indicates a regular file.

Parameters:
path Path to check.
Returns:
Boolean. (Also false if there's an error.)
int is_link ( char *  path  ) 

Checks whether the specified path indicates a link.

Parameters:
path Path to check.
Returns:
Boolean. (Also false if there's an error.)

Generated on Sun Feb 28 18:08:04 2010 for CWB by  doxygen 1.6.1