module Lune::SingleInstance

Defined in:

lune/single_instance.cr

Class Method Summary

Class Method Detail

def self.acquire(app_slug : String, dir : String = File.join(Path.home, ".lune")) : File | Nil #

Tries to acquire an exclusive non-blocking flock on the lock file. Returns the open File (which must stay open to hold the lock) or nil if another process already holds it.


[View source]
def self.slug(title : String) : String #

Converts an app title into a safe filename slug.


[View source]