Module: Twenty::Path

Extended by:
Path
Included in:
Path
Defined in:
lib/twenty/server/path.rb

Instance Method Summary collapse

Instance Method Details

#datadirString

Returns the directory where twenty stores persistent data.

Returns:

  • (String)

    Returns the directory where twenty stores persistent data.



10
11
12
# File 'lib/twenty/server/path.rb', line 10

def datadir
  File.join(Dir.home, ".local", "share", "twenty")
end

#pidfileString

Returns the file where twenty can write the PID of a web server running in the background.

Returns:

  • (String)

    Returns the file where twenty can write the PID of a web server running in the background.



25
26
27
# File 'lib/twenty/server/path.rb', line 25

def pidfile
  File.join(tmpdir, "server.pid")
end

#tmpdirString

Returns the directory where twenty stores temporary data.

Returns:

  • (String)

    Returns the directory where twenty stores temporary data.



17
18
19
# File 'lib/twenty/server/path.rb', line 17

def tmpdir
  File.join(Dir.tmpdir, "twenty")
end