containsOnlyOnePeriod method

bool containsOnlyOnePeriod()

Checks if a file name contains only one period.

fileName - The file name.

Returns true if the file name contains only one period, false otherwise.

Implementation

bool containsOnlyOnePeriod() {
  final periodCount = split('.').length - 1;
  return periodCount == 1;
}