Welcome to mirror list, hosted at ThFree Co, Russian Federation.

file_name_utils.hpp « coding - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f45f9fcb9106832b207a16c136b707c43b9fea6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once

#include "../std/string.hpp"
#include "../std/vector.hpp"

namespace my
{
  /// Remove extension from file name.
  void GetNameWithoutExt(string & name);
  /// @return File extension with the dot or empty string if no extension found.
  string GetFileExtension(string const & name);

  /// Get file name from full path.
  void GetNameFromFullPath(string & name);

  /// Get folder separator for specific platform
  string GetNativeSeparator();

  /// Create full path from some folder using native folders separator
  string JoinFoldersToPath(const string & folder, const string & file);
  string JoinFoldersToPath(const string & folder1, const string & folder2, const string & file);
  string JoinFoldersToPath(const string & folder1, const string & folder2, const string & folder3, const string & file);
  string JoinFoldersToPath(const vector<string> & folders, const string & file);
}