FileExists           package:RandomFields           R Documentation

_F_i_l_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     The function 'FileExists' checks whether a file or a lock-file
     exists

     The function 'LockRemove' removes a lock-file

_U_s_a_g_e:

        FileExists(file, PrintLevel=RFparameters()$Print)

        LockRemove(file)

_A_r_g_u_m_e_n_t_s:

    file: name of the data file

PrintLevel: if 'PrintLevel<=1' no messages are displayed

_D_e_t_a_i_l_s:

     'FileExists' checks whether file or file.lock exists.  If none of
     them exists 'file'.lock is created and hostname and PID are
     written into 'file'.lock.  This is useful if several processes use
     the same directory.  Further, it is checked whether another
     process has tried to create the same file in the same instance. 
     In this case 'FileExists' returns for at least one of the
     processes that 'file'.lock has already been created.

_V_a_l_u_e:

     'FileExists' returns 

       1: if 'file' already exists

       2: if 'file'.lock already exists

       3: if 'file'.lock was tried to be created, but another process
          inferred and got priority

       0: otherwise, 'file' and 'file'.lock did not exist and
          'file'.lock was created

_A_u_t_h_o_r(_s):

     Martin Schlather, martin.schlather@cu.lu <URL:
     http://www.cu.lu/~schlathe>

