Obtain a lock for a file at the given path. If the file cannot be locked within the given duration, an exception is thrown. The file will be created if it does not yet exist. Deleting the file is not safe as another process could create a new file with the same name. The returned lock will get unlocked upon destruction.
Search for filename in the envPath variable content which can contain multiple paths separated with sep depending on platform.
return the path of a file in a temp dir location with a unique name. fnFmt should be a file name (without directory) containing "%s" for use with std.format. It is used to insert a unique random string in the path.
environment variable path separator