fileleng man page on Xenix

Man page or keyword search:  
man Server   1130 pages
apropos Keyword Search (all sections)
Output format
Xenix logo
[printable version]



     FILELENGTH(DOS)	      XENIX System V	       FILELENGTH(DOS)

     Name
	  filelength - Gets the length of a file.

     Syntax
	  #include <io.h>

	  long filelength (handle);
	  int handle;

     Description
	  The filelength function returns the length in bytes of the
	  file associated with the given handle.

     Return Value
	  filelength returns the file length in bytes.	A return value
	  of -1L indicates an error, and errno is set to EBADF to
	  indicate an invalid file handle.
     See Also
	  chsize(S), ferror(S), stat(S)

     Example
	  #include <io.h> #include <stdio.h> #include <stdlib.h>

	  FILE *stream; long length;

	  stream = fopen ("data","r");
	    .
	    .
	    .  /* The following statements attempt to determine the **
	  length of a file associated with a stream.  */

	  length = filelength (fileno (stream));

	  if (length == -1L)	  perror ("filelength failed");

     Notes
	  This call must be compiled with the -dos flag.

     Page 1					      (printed 8/7/87)

[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Xenix

List of man pages available for Xenix

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net