Method: PostRunner::FitFileStore#fit_file_dir

Defined in:
lib/postrunner/FitFileStore.rb

#fit_file_dir(fit_file_base_name, long_uid, type) ⇒ String

Determine the right directory for the given FIT file. The resulting path looks something like /home/user/.postrunner/devices/garmin-fenix3-1234/ activity/5A.

Parameters:

  • fit_file_base_name (String)

    The base name of the fit file

  • long_uid (String)

    the long UID of the device

  • type (String)

    ‘activity’ or ‘monitoring’

Returns:

  • (String)

    the full path name of the archived FIT file



202
203
204
205
206
207
# File 'lib/postrunner/FitFileStore.rb', line 202

def fit_file_dir(fit_file_base_name, long_uid, type)
  # The first letter of the FIT file specifies the creation year.
  # The second letter of the FIT file specifies the creation month.
  File.join(@store['config']['devices_dir'],
            long_uid, type, fit_file_base_name[0..1])
end