Setting execute bit for a Unix file

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Setting execute bit for a Unix file

Juha Manninen
Hello

How can I set a file flag (execute) using Pascal code in a Linux system?

Juha
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Setting execute bit for a Unix file

David Copeland
You could try FpSystem('chmod +x yourfilename');  // assuming the cwd is set

Dave.

On 07/31/2014 04:18 PM, Juha Manninen wrote:
> Hello
>
> How can I set a file flag (execute) using Pascal code in a Linux system?
>
> Juha
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Setting execute bit for a Unix file

Karoly Balogh (Charlie/SGR)
Hi,

Naaah, better use FpChmod() in BaseUnix unit:

http://www.freepascal.org/docs-html/rtl/baseunix/fpchmod.html

Charlie

On Thu, 31 Jul 2014, David Copeland wrote:

> You could try FpSystem('chmod +x yourfilename');  // assuming the cwd is set
>
> Dave.
>
> On 07/31/2014 04:18 PM, Juha Manninen wrote:
> > Hello
> >
> > How can I set a file flag (execute) using Pascal code in a Linux system?
> >
> > Juha
> > _______________________________________________
> > fpc-pascal maillist  -  [hidden email]
> > http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Setting execute bit for a Unix file

David Copeland
I agree, you learn something new every day!

Dave.

On 07/31/2014 04:26 PM, Karoly Balogh (Charlie/SGR) wrote:

> Hi,
>
> Naaah, better use FpChmod() in BaseUnix unit:
>
> http://www.freepascal.org/docs-html/rtl/baseunix/fpchmod.html
>
> Charlie
>
> On Thu, 31 Jul 2014, David Copeland wrote:
>
>> You could try FpSystem('chmod +x yourfilename');  // assuming the cwd is set
>>
>> Dave.
>>
>> _______________________________________________
>> fpc-pascal maillist  -  [hidden email]
>> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Setting execute bit for a Unix file

Juha Manninen
In reply to this post by Karoly Balogh (Charlie/SGR)
On Thu, Jul 31, 2014 at 11:26 PM, Karoly Balogh (Charlie/SGR)
<[hidden email]> wrote:
> Naaah, better use FpChmod() in BaseUnix unit:
> http://www.freepascal.org/docs-html/rtl/baseunix/fpchmod.html

Right, I was looking at page
  http://www.freepascal.org/docs-html/rtl/unix/index-5.html
but did not notice this one.
Thanks Karoly and David.

Juha
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal