comp.lang.ada
 help / color / mirror / Atom feed
* Re: Setting file attributes in ADA 95
  1996-10-07  0:00 Setting file attributes in ADA 95 Jason Yates
@ 1996-10-07  0:00 ` Mats Weber
  1996-10-08  0:00 ` Bob Klungle
  1996-10-08  0:00 ` Robert Dewar
  2 siblings, 0 replies; 4+ messages in thread
From: Mats Weber @ 1996-10-07  0:00 UTC (permalink / raw)



In article <01bbb456$f92ec680$ef947f82@yates.clemson.edu>, "Jason Yates"
<yates@clemson.edu> wrote:

>I am creating a program that writes a file on a Sun box. I need to set the
>file attriutes to read / execute so other users can access the file, i.e
><chmod 755 filename>. I am new to ADA so any help would be appreciated. BTW
>I am using the GNAT complier.

The best way of doing this is by using the POSIX 1003.5 standard binding
(is there one for GNAT ?). Ada's standard IO packages are far from a full
interface to the unix filesystem.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Setting file attributes in ADA 95
@ 1996-10-07  0:00 Jason Yates
  1996-10-07  0:00 ` Mats Weber
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jason Yates @ 1996-10-07  0:00 UTC (permalink / raw)



I am creating a program that writes a file on a Sun box. I need to set the
file attriutes to read / execute so other users can access the file, i.e
<chmod 755 filename>. I am new to ADA so any help would be appreciated. BTW
I am using the GNAT complier.

TIA,
Jason Yates
Clemson University
yates@clemson.edu




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Setting file attributes in ADA 95
  1996-10-07  0:00 Setting file attributes in ADA 95 Jason Yates
  1996-10-07  0:00 ` Mats Weber
  1996-10-08  0:00 ` Bob Klungle
@ 1996-10-08  0:00 ` Robert Dewar
  2 siblings, 0 replies; 4+ messages in thread
From: Robert Dewar @ 1996-10-08  0:00 UTC (permalink / raw)



Jason said

"I am creating a program that writes a file on a Sun box. I need to set the
file attriutes to read / execute so other users can access the file, i.e
<chmod 755 filename>. I am new to ADA so any help would be appreciated. BTW
I am using the GNAT complier.
"

Be sure to look at package Ada.Text_IO.C_Streams in file a-tiocst.ads
which allows you to gt your hands on the c stream in use, so you acn
call standard C routines for messing with such things. There are
similar packages for direct and seqeuntial IO.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Setting file attributes in ADA 95
  1996-10-07  0:00 Setting file attributes in ADA 95 Jason Yates
  1996-10-07  0:00 ` Mats Weber
@ 1996-10-08  0:00 ` Bob Klungle
  1996-10-08  0:00 ` Robert Dewar
  2 siblings, 0 replies; 4+ messages in thread
From: Bob Klungle @ 1996-10-08  0:00 UTC (permalink / raw)



This is not an Ada question. You can set your umask to 022 to get
everything but the execute (x) bit. At the end of generation, a script
command using chmod could also do it. You could also import a "C"
subroutine which issues the chmod command, if your Ada does not include the
"system" command.

cheers
bob

Jason Yates <yates@clemson.edu> wrote in article
<01bbb456$f92ec680$ef947f82@yates.clemson.edu>...
> I am creating a program that writes a file on a Sun box. I need to set
the
> file attriutes to read / execute so other users can access the file, i.e
> <chmod 755 filename>. I am new to ADA so any help would be appreciated.
BTW
> I am using the GNAT complier.
> 
> TIA,
> Jason Yates
> Clemson University
> yates@clemson.edu
> 




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1996-10-08  0:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-10-07  0:00 Setting file attributes in ADA 95 Jason Yates
1996-10-07  0:00 ` Mats Weber
1996-10-08  0:00 ` Bob Klungle
1996-10-08  0:00 ` Robert Dewar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox