Unix Programming - Re: Reading and writing file header

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > April 2004 > Re: Reading and writing file header





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Reading and writing file header
Kasee Palaniappan BE Msc

2004-04-11, 3:29 pm

Hi,
Is there any one, who could help me in knowing the header of the any
text file. I know there should be a header for each and every file,
which says the file size, file name, file exensions and so on. but I
could not find the exact details.
Fletcher Glenn

2004-04-11, 3:29 pm



Kasee Palaniappan BE Msc wrote:
> Hi,
> Is there any one, who could help me in knowing the header of the any
> text file. I know there should be a header for each and every file,
> which says the file size, file name, file exensions and so on. but I
> could not find the exact details.


It's not a header, it's a directory entry. For access to directory
information of any file, look at the man pages for opendir() and
readdir(). For just one file, you can also look at stat() or fstat().

--

Fletcher Glenn

zapple

2004-04-15, 7:02 am

quote:
Originally posted by Fletcher Glenn
Kasee Palaniappan BE Msc wrote:
> Hi,
> Is there any one, who could help me in knowing the header of the any
> text file. I know there should be a header for each and every file,
> which says the file size, file name, file exensions and so on. but I
> could not find the exact details.


It's not a header, it's a directory entry. For access to directory
information of any file, look at the man pages for opendir() and
readdir(). For just one file, you can also look at stat() or fstat().

--

Fletcher Glenn



Hi
Thanks very much. My problem is, I would like to change a number of file names to other file names. For example, the file name of the one created from Digital Cameras are funny so I would like to change them without using any shell scripts, but with only C System level commands.
With regards
Kasee Palaniappan BE Msc
www.geocities.com/kasee_pl
Jens.Toerring@physik.fu-berlin.de

2004-04-15, 12:41 pm

zapple <zapple.14r7xn@mail.webservertalk.com> wrote:

> Fletcher Glenn wrote:
[vbcol=seagreen]
> Thanks very much. My problem is, I would like to change a number of
> file names to other file names. For example, the file name of the one
> created from Digital Cameras are funny so I would like to change them
> without using any shell scripts, but with only C System level
> commands.


To rename a file there's a standard C function, appropriately
called rename(2):

int rename(const char *oldpath, const char *newpath);

It's declared in <stdio.h>.
Regards, Jens
--
\ Jens Thoms Toerring ___ Jens.Toerring@physik.fu-berlin.de
\__________________________ http://www.toerring.de
Kasee Palaniappan BE Msc

2004-04-23, 7:34 pm

zapple <zapple.14r7xn@mail.webservertalk.com> wrote in message news:<zapple.14r7xn@mail.webservertalk.com>...
> Fletcher Glenn wrote:
> any
> file,
> I
>
> Hi
> Thanks very much. My problem is, I would like to change a number of
> file names to other file names. For example, the file name of the one
> created from Digital Cameras are funny so I would like to change them
> without using any shell scripts, but with only C System level
> commands.
> With regards
> Kasee Palaniappan BE Msc
> www.geocities.com/kasee_pl



Hello,
Back again with doubts.
How to access System tray in windows with Java programming language.
Anyone can help?
Please
Thanks in advance
Kasee Palaniappan (Zapple)
Barry Margolin

2004-04-23, 8:34 pm

In article <43dc270f.0404231520.6e15b1db@posting.google.com>,
zapple@email.com (Kasee Palaniappan BE Msc) wrote:

> How to access System tray in windows with Java programming language.
> Anyone can help?


This group is comp.unix.programming -- why would you expect answers to
Windows programming here?

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com