Mobile API Reference  MicroStrategy 2019
Path.h
Go to the documentation of this file.
1 //==============================================================================================
2 // FILENAME : Path.h
3 // AUTHOR : vovechkin
4 // CREATION : 2002-08-27
5 // Copyright (C) MicroStrategy Incorporated 2002
6 // All Rights Reserved
7 //==============================================================================================
8 #ifndef MFileSystem_Path_h
9 #define MFileSystem_Path_h
10 
11 #include "FileSystem.h"
12 
13 //Yuqiang Huang - 01/13/2010 - TQMS 447466, 448037
14 //To make consistent with GUI (Web/MSTRDesk), make file name length limit to 250
15 const int FILE_NAME_LENGTH_LIMIT = 250;
16 const int FILE_EXTENSION_LENGTH_LIMIT = 4; //Based common practice
17 //Though different platforms have different limit, we simply choose the common mininum.
19 
20 #if defined(WIN32)
21  const int COMPLETE_FILE_PATH_LENGTH_LIMIT = 255;
22 #else
23  const int COMPLETE_FILE_PATH_LENGTH_LIMIT = 2147483647; //INT_MAX - Maximum value for a variable of type int.
24 #endif
25 
26 //Yuqiang Huang - 09/27/2010
27 //i-Server runs on Unix and saves files to Windows file sever
28 typedef enum
29 {
33 
34 namespace MDataType
35 {
36  class StringCollection;
37 }
38 
39 namespace MFileSystem
40 {
45  {
46  public:
47 
58  static bool IsAbsolute( const char* ipPath );
59 
64  static MBase::ReturnString ToAbsolute(const char* ipPath);
65 
71  static bool IsDirectory( const char* ipPath );
72 
78  static bool IsFile( const char* ipPath );
79 
85  static bool IsReadable( const char* ipPath );
86 
92  static bool IsWriteable( const char* ipPath );
93 
94 
102  //static bool AreExistingFoldersWriteable( const char* ipPath );
103 
111  static MBase::ReturnString GetParent( const char* ipPath );
112 
126  static MBase::ReturnString Internalize(const char* ipPath);
127 
147  static MBase::ReturnString Combine( const char* ipBasePath, const char* ipPath );
148 
154  static MBase::ReturnString GetDirname( const char* ipPath );
155 
161  static MBase::ReturnString GetBasename( const char* ipPathFileName );
162 
168  static MBase::ReturnString GetExtension(const char* ipFileName);
169 
175  static MBase::ReturnString GetBasenameWithoutExtension(const char* ipFileName);
176 
182  static MDataType::StringCollection* GetFileNamesWithPattern( const char* ipPathPattern );
183 
184  //Yuqiang Huang - 09/27/2010
185  //i-Server runs on Unix and saves files to Windows file sever
186  static bool IsAbsoluteCrossPlatform( const char* ipPath, EnumFileDestPlatforms iFileDestPlatform );
187  static MBase::ReturnString CombineCrossPlatform( const char* ipBasePath, const char* ipPath, EnumFileDestPlatforms iFileDestPlatform );
188  };
189 }
190 
191 #endif // MFileSystem_Path_h
const int COMPLETE_FILE_NAME_LENGTH_LIMIT
Definition: Path.h:18
Definition: ReturnString.h:36
Definition: Path.h:44
Definition: Path.h:31
const int FILE_NAME_LENGTH_LIMIT
Definition: Path.h:15
Definition: BigDecimal.h:18
EnumFileDestPlatforms
Definition: Path.h:28
Definition: Path.h:30
const int COMPLETE_FILE_PATH_LENGTH_LIMIT
Definition: Path.h:23
Definition: StringCollection.h:19
const int FILE_EXTENSION_LENGTH_LIMIT
Definition: Path.h:16
Definition: StrongObjects.h:21
#define DLL_FILE_SYSTEM_EXIM
Definition: FileSystem.h:11