[[Q] How set the permissions of text file

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[[Q] How set the permissions of text file

Edgar De Cleene

I working in a Squeak way of creating and serve tvml files.

 

stream := StandardFileStream forceNewFileNamed: aFileName.

stream nextPutAll: self tvml pageEnd.

stream close 


Squeak gives me this

-rw-r--r--@

and I need this

-rwxr-xr-x


How i set the right permissions from inside Squeak ?


-- 
Edgar
@morplenauta








Reply | Threaded
Open this post in threaded view
|

Re: [[Q] How set the permissions of text file

marcel.taeumel
Hi Edgar,

to my knowledge, there are no primitives in the FilePlugin that support setting permissions. You can, however, use OSProces and a shell command to set the permissions.

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: [[Q] How set the permissions of text file

Bert Freudenberg

> On 14.04.2016, at 09:46, marcel.taeumel <[hidden email]> wrote:
>
> Hi Edgar,
>
> to my knowledge, there are no primitives in the FilePlugin that support
> setting permissions. You can, however, use OSProces and a shell command to
> set the permissions.
>
> Best,
> Marcel
That being said, I highly doubt that a TVML file needs to be made executable. "-rw-r--r—“ should be fine because it’s not going to be executed directly (that is what the “x” bit allows).

- Bert -




smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [[Q] How set the permissions of text file

Edgar De Cleene
In reply to this post by marcel.taeumel
Thanks Marcel and Bert

On April 14, 2016 at 05:18:42, marcel.taeumel ([hidden email]) wrote:

That being said, I highly doubt that a TVML file needs to be made executable. "-rw-r--r—“ should be fine because it’s not going to be executed directly (that is what the “x” bit allows). 

- Bert - 


Well, in doing my first baby steps in tvOS, but share what i learn

The Squeak server works fine, you could arrange your folder outside Xcode and works like examples using Python.

If you copy any of provided templates with a text editor, the examples do not run.

If you made a test with a text editor, the examples do not run.

The saved file with a text editor have same permissions as Squeak, with the @ at the end.

I plan to go http://www.spaceappsrosario.com and present a kind of “KNowNASA” app with public and free files of http://www.nasa.gov.

Any wishing be part of this, email me directly.

Edgar

@morplenauta