pub fn lock(&self) -> Result<()> {
        let path = self.lock_path();
        if !path.exists() {
            try!(fs::OpenOptions::new().write(true).create(true).open(path));
        }
        Ok(())
    }
/// Creates a lock file. Daemon will check this lock file and stop operating if its exists.
Creates a lock file. Daemon will check this lock file and stop operating if its exists.
Creates a lock file . Daemon will check this lock file and stop operating if its exists .
pub fn lock(&self) -> Result<()> {
        let path = self.lock_path();
        if !path.exists() {
            try!(fs::OpenOptions::new().write(true).create(true).open(path));
        }
        Ok(())
    }
pub fn lock ( & self ) -> Result < ( ) > { let path = self . lock_path ( ) ; if ! path . exists ( ) { try ! ( fs OpenOptions new ( ) write ( true ) create ( true ) open ( path ) ) ; } Ok ( ( ) ) }
Creates a lock file.
Creates a lock file .
&self