lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


D Burgess wrote:
I understand, someone correct me if I am wrong that on
Unix unlink will remove the file when the last user of it
closes the file. THis equals the FILEFLAG_DELETE_ON_CLOSE
on windows.

I think the clib remove() function is intentionally non-specific. Remove a file with a given name and no one can access it by that name again. It says nothing about what capabilities the caller must have or if the action actually frees any disk space. I think this is a good spec for a cross-platform function.

Ok, so maybe clib is not so arbitrary :-)

--
chris marrin              ,""$, "As a general rule,don't solve puzzles
chris@marrin.com        b`    $  that open portals to Hell" ,,.
        ,.`           ,b`    ,`                            , 1$'
     ,|`             mP    ,`                              :$$'     ,mm
   ,b"              b"   ,`            ,mm      m$$    ,m         ,`P$$
  m$`             ,b`  .` ,mm        ,'|$P   ,|"1$`  ,b$P       ,`  :$1
 b$`             ,$: :,`` |$$      ,`   $$` ,|` ,$$,,`"$$     .`    :$|
b$|            _m$`,:`    :$1   ,`     ,$Pm|`    `    :$$,..;"'     |$:
P$b,      _;b$$b$1"       |$$ ,`      ,$$"             ``'          $$
 ```"```'"    `"`         `""`        ""`                          ,P`