• file modes

    From Chris Hoppman@1:129/305 to All on Saturday, July 03, 2004 00:08:32
    How would you go about setting file modes in tp?


    Like
    fm_deny_read_write;
    fm_allow_read_write;
    filemode := ??


    thanks

    chris

    --- Renegade v06-27.4 Alpha
    * Origin: The Titantic BBS Telnet - ttb.slyip.com (1:129/305)
  • From Scott Adams@1:112/91 to Chris Hoppman on Sunday, July 04, 2004 01:32:25
    Quoting Chris Hoppman to All <=-


    How would you go about setting file modes in tp?

    Like
    fm_deny_read_write;
    fm_allow_read_write;
    filemode := ??

    This is done through the pascal file commands
    Reset, Rewrite, Assign, Close, Etc. Append.


    ... Vini, vidi, Vorlon. : I came, I saw, I *AM*.
    --- Fringe BBS
    * Origin: EWOG II - The Fringe - 904-733-1721 (1:112/91)
  • From Jasen Betts@3:640/1042 to Chris Hoppman on Sunday, July 04, 2004 14:02:58
    Hello Chris.

    02 Jul 04 23:08, you wrote to all:

    How would you go about setting file modes in tp?

    Like
    fm_deny_read_write;
    fm_allow_read_write;
    filemode := ??

    Get yourself a good dos reference like "Ralf Brown's interrupt list" (inter*.zip) the TP internals ar closely linked with DOS,

    === Cut ===
    the following tables are takes from the above.

    Bitfields for access and sharing modes:
    Bit(s) Description (Table 0521)
    2-0 access mode
    000 read only
    001 write only
    010 read/write
    011 (DOS 5+ internal) passed to redirector on EXEC to allow
    case-sensitive filenames
    3 reserved (0)
    6-4 sharing mode (DOS 3+)
    000 compatibility mode
    001 "DENYALL" prohiboth read and write access by others
    010 "DENYWRITE" prohiwrite access by others
    011 "DENYREAD" prohiread access by others
    100 "DENYNONE" allow full access by others
    111 network FCB (only available during server call)
    7 inheritance
    if set, file is private to current process and will not be inherited
    by child processes

    (Table 0522)
    Values of DOS file sharing behavior:

    | Second and subsequent Opens
    First |Compat Deny Deny Deny Deny
    Open | All Write Read None
    |R W RW R W RW R W RW R W RW R W RW
    - - - - -| - - - - - - - - - - - - - - - - -
    Compat R |Y Y Y N N N 1 N N N N N 1 N N
    W |Y Y Y N N N N N N N N N N N N
    RW|Y Y Y N N N N N N N N N N N N
    - - - - -|
    Deny R |C C C N N N N N N N N N N N N
    All W |C C C N N N N N N N N N N N N
    RW|C C C N N N N N N N N N N N N
    - - - - -|
    Deny R |2 C C N N N Y N N N N N Y N N
    Write W |C C C N N N N N N Y N N Y N N
    RW|C C C N N N N N N N N N Y N N
    - - - - -|
    Deny R |C C C N N N N Y N N N N N Y N
    Read W |C C C N N N N N N N Y N N Y N
    RW|C C C N N N N N N N N N N Y N
    - - - - -|
    Deny R |2 C C N N N Y Y Y N N N Y Y Y
    None W |C C C N N N N N N Y Y Y Y Y Y
    RW|C C C N N N N N N N N N Y Y Y
    Legend: Y = open succeeds, N = open fails with error code 05h
    C = open fails, INT 24 generated
    1 = open succeeds if file read-only, else fails with error code
    2 = open succeeds if file read-only, else fails with INT 24 -------------------------------------------------------------------------------
    Jasen

    --- GoldED+/LNX 1.1.4.7
    * Origin: (3:640/1042)
  • From Dan Egli@1:311/6 to Scott Adams on Monday, July 05, 2004 02:34:32
    Hey Scott,

    04 Jul 04 00:32, you wrote to Chris Hoppman:

    Quoting Chris Hoppman to All <=-


    How would you go about setting file modes in tp?

    Like
    fm_deny_read_write;
    fm_allow_read_write;
    filemode := ??

    This is done through the pascal file commands
    Reset, Rewrite, Assign, Close, Etc. Append.

    no, he means SHARE modes. The three standard modes for Share locking are:
    deny NONE
    Deny WRITE
    Deny ALL

    I'm not sure how that would be accomplished in TP. Look in your help files for commands refferencing SHARE.EXE.

    -- Dan

    --- FMail/Win32 1.60
    * Origin: * Coming Soon! Telnet://thedungeon.dnsalias.net! (1:311/6)
  • From Chris Hoppman@1:129/305 to Jasen Betts on Monday, July 05, 2004 09:01:24
    Get yourself a good dos reference like "Ralf Brown's interrupt list" (inter*.zip) the TP internals ar closely linked with DOS,

    wow.. ;)

    --- Renegade v06-27.4 Alpha
    * Origin: The Titantic BBS Telnet - ttb.slyip.com (1:129/305)
  • From Scott Adams@1:112/91 to Dan Egli on Monday, July 05, 2004 22:05:50
    Quoting Dan Egli to Scott Adams <=-

    How would you go about setting file modes in tp?

    Like
    fm_deny_read_write;
    fm_allow_read_write;
    filemode := ??

    This is done through the pascal file commands
    Reset, Rewrite, Assign, Close, Etc. Append.

    no, he means SHARE modes. The three standard modes for Share locking
    are: deny NONE
    Deny WRITE
    Deny ALL

    I'm not sure how that would be accomplished in TP. Look in your help
    files for commands refferencing SHARE.EXE.

    Oh file locking! Ok. Yeah Swag has about 15 files on this very
    subject including a share unit in asm among others. If you
    don't have a copy of SWAG my website should have the link.

    http://users.cybermax.net/~longshot (links page)



    ... "And Vir, don't give away the homeworld." - Londo
    --- Fringe BBS
    * Origin: EWOG II - The Fringe - 904-733-1721 (1:112/91)
  • From Dan Egli@1:311/6 to Scott Adams on Tuesday, July 06, 2004 00:02:34
    Hey Scott,

    05 Jul 04 21:05, you wrote to me:

    Quoting Dan Egli to Scott Adams <=-

    How would you go about setting file modes in tp?

    Like
    fm_deny_read_write;
    fm_allow_read_write;
    filemode := ??

    This is done through the pascal file commands
    Reset, Rewrite, Assign, Close, Etc. Append.

    no, he means SHARE modes. The three standard modes for Share
    locking
    are: deny NONE
    Deny WRITE
    Deny ALL

    I'm not sure how that would be accomplished in TP. Look in your
    help files for commands refferencing SHARE.EXE.

    Oh file locking! Ok. Yeah Swag has about 15 files on this very
    subject including a share unit in asm among others. If you
    don't have a copy of SWAG my website should have the link.

    http://users.cybermax.net/~longshot (links page)

    I have the swags, just forgot to look there.

    -- Dan

    --- FMail/Win32 1.60
    * Origin: * Coming Soon! Telnet://thedungeon.dnsalias.net! (1:311/6)
  • From mark lewis@1:3634/12 to Chris Hoppman on Wednesday, July 07, 2004 01:56:56
    How would you go about setting file modes in tp?

    Like
    fm_deny_read_write;
    fm_allow_read_write;
    filemode := ??

    i generally do it like this...

    Const
    fmReadOnly = 0; {FileMode constants}
    fmWriteOnly = 1;
    fmReadWrite = 2;
    fmDenyAll = 16;
    fmDenyWrite = 32;
    fmDenyRead = 48;
    fmDenyNone = 64;
    fmNoInherit = 128;


    then in the code, i do this...

    oldmode := filemode; {save current filemode}
    filemode := fmreadonly + fmdenynone; {set desired filemode}
    {assign, open and work with the file}
    filemode := oldmode; {restore original filemode}

    )\/(ark


    * Origin: (1:3634/12)
  • From Scott Adams@1:112/91 to Dan Egli on Wednesday, August 04, 2004 03:30:52
    Quoting Dan Egli to Scott Adams <=-

    How would you go about setting file modes in tp?

    Like
    fm_deny_read_write;
    fm_allow_read_write;
    filemode := ??

    This is done through the pascal file commands
    Reset, Rewrite, Assign, Close, Etc. Append.

    no, he means SHARE modes. The three standard modes for Share
    locking
    are: deny NONE

    Its a wealth of information. Its from this very echo
    after about 15 years of good coders and good code.
    Well not this echo but he pascal echo.

    ... "I'm a ground-pounder." - Dodger
    --- Fringe BBS
    * Origin: EWOG II - The Fringe - 904-733-1721 (1:112/91)