[REBOL] Re: File-modes on different platforms
From: carl:cybercraft at: 20-May-2002 13:53
On 20-May-02, Anton wrote:
> Carl, I just read your mail, thanks.
> Ok, now I have the Amiga results too.
> But notice the "comment" file-mode at the bottom: "none" ??
> What rebol value has type none ?
> Can you investigate this Carl?
> get-modes %afile 'comment
Hi Anton,
Seems if the file has no comment a 'none's returned, not an empty
string...
>> get-modes %anton-filemode-test 'comment
== none
And after adding a comment to your file...
>> get-modes %anton-filemode-test 'comment
== "Test-comment"
Should this be considered a bug?
Carl.
> Anton.
>> On 17-May-02, Anton wrote:
>>> Hello,
>>> I am interested to see the different file modes
>>> available on different platforms.
>>> I have tested on Windows2k and NT4.
>>> I need Linux, Amiga, Mac and any others.
>>> I would like you out there who have one of the above platforms to
>>> try the following code and report back with the result.
>> save file: %anton-filemode-test "" ; create a file to experiment
>> on foreach mode get-modes %dummy 'file-modes [
>> print [
>> type? get-modes file mode
>> mode
>> if error? set/any 'err try [
>> set-modes file compose [
>> (to-set-word mode) (get-modes file mode)
>> ]
>> ][probe disarm err]
>> ]
>> ]
>> delete file ; clean up
>>> The code just prints out the datatype of each mode,
>>> the mode word, and reports if there was an error
>>> setting that mode. (I want to see which modes cannot
>>> be modified, if any.)
>> On Amiga I get none for everything, which I guess is good?...
>> date modification-date none
>> integer owner-id none
>> integer group-id none
>> logic pure none
>> logic script none
>> logic hold none
>> logic archived none
>> logic owner-read none
>> logic owner-write none
>> logic owner-execute none
>> logic owner-delete none
>> logic group-read none
>> logic group-write none
>> logic group-execute none
>> logic group-delete none
>> logic world-read none
>> logic world-write none
>> logic world-execute none
>> logic world-delete none
>> none comment none
>> --
>> Carl Read
--
Carl Read