Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
hdicoreFiles.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_FILE_MANIP__
8 #define __HDI_CORE_FILE_MANIP__
9 
10 #include <vector>
11 
12 #include "hdicoreTypes.h"
13 
14 namespace hdi
15 {
16  namespace core
17  {
18  namespace files
19  {
20  typedef std::vector<std::string> StringVector;
21 
30  bool exists(const std::string& filePath_);
31 
44  bool copy(const std::string& filePath_, const std::string& destPath_);
45 
57  bool rename(const std::string& filePath_, const std::string& newName_);
58 
70  bool move(const std::string& fromFilePath_, const std::string& toFolderPath_);
71 
80  int64_t getSize(const std::string& filePath_);
81 
92  std::string getTextContents(const std::string& filePath_);
93 
108  bool setTextContents(const std::string& filePath_, const std::string& contents_);
109 
122  bool getPermissions(const std::string& filePath_, mode_t& perms__);
123 
140  bool makeDirectory(const std::string& path_, const mode_t perms_);
141 
151  bool filesInDirectory(const std::string& path_, StringVector& files__);
152 
161  bool moveToTrash(const std::string& filePath_);
162 
175  bool ungzip(const std::string& sourcePath_, const std::string& destPath_);
176 
190  std::string platformPrefsPath(const std::string& subfolder_, const bool create_ = true);
191  }
192  }
193 }
194 
195 #endif
196 // __HDI_CORE_FILE_MANIP__
Header file for a wide variety of necessary typedefs, enums, and forwards declarations.
Definition: hdicoreaiArray.h:12