Skip to content

bruceg/dotlock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotlock

Crate Build Status

This crate contains support for creating lock files as are used on various UNIX type systems. This is similar to the lockfile program from procmail or the dotlockfile program from liblockfile.

Documentation

Usage

Add this to your Cargo.toml:

[dependencies]
dotlock = "0"

...and this to your crate root:

extern crate dotlock;

Example

extern crate dotlock;
use std::fs::File;
use std::io::{Write, Read, Seek, SeekFrom};

fn main() {
    let mut lock = dotlock::Dotlock::create("some.file.lock").unwrap();
    writeln!(lock, "Do not touch this file!").unwrap();
}

About

Rust library to create .lock files

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages