RemoteFiles.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  1. //---------------------------------------------------------------------------
  2. #ifndef RemoteFilesH
  3. #define RemoteFilesH
  4. //---------------------------------------------------------------------------
  5. #include <vector>
  6. #include <map>
  7. //---------------------------------------------------------------------------
  8. enum TModificationFmt { mfNone, mfMDHM, mfMDY, mfFull };
  9. //---------------------------------------------------------------------------
  10. #define SYMLINKSTR L" -> "
  11. #define PARENTDIRECTORY L".."
  12. #define THISDIRECTORY L"."
  13. #define ROOTDIRECTORY L"/"
  14. #define FILETYPE_DEFAULT L'-'
  15. #define FILETYPE_SYMLINK L'L'
  16. #define FILETYPE_DIRECTORY L'D'
  17. #define PARTIAL_EXT L".filepart"
  18. //---------------------------------------------------------------------------
  19. class TTerminal;
  20. class TRights;
  21. class TRemoteFileList;
  22. class THierarchicalStorage;
  23. //---------------------------------------------------------------------------
  24. class TRemoteToken
  25. {
  26. public:
  27. __fastcall TRemoteToken();
  28. explicit __fastcall TRemoteToken(const UnicodeString & Name);
  29. void __fastcall Clear();
  30. bool __fastcall operator ==(const TRemoteToken & rht) const;
  31. bool __fastcall operator !=(const TRemoteToken & rht) const;
  32. TRemoteToken & __fastcall operator =(const TRemoteToken & rht);
  33. int __fastcall Compare(const TRemoteToken & rht) const;
  34. __property UnicodeString Name = { read = FName, write = FName };
  35. __property bool NameValid = { read = GetNameValid };
  36. __property unsigned int ID = { read = FID, write = SetID };
  37. __property bool IDValid = { read = FIDValid };
  38. __property bool IsSet = { read = GetIsSet };
  39. __property UnicodeString LogText = { read = GetLogText };
  40. __property UnicodeString DisplayText = { read = GetDisplayText };
  41. private:
  42. UnicodeString FName;
  43. unsigned int FID;
  44. bool FIDValid;
  45. void __fastcall SetID(unsigned int value);
  46. bool __fastcall GetNameValid() const;
  47. bool __fastcall GetIsSet() const;
  48. UnicodeString __fastcall GetDisplayText() const;
  49. UnicodeString __fastcall GetLogText() const;
  50. };
  51. //---------------------------------------------------------------------------
  52. class TRemoteTokenList
  53. {
  54. public:
  55. TRemoteTokenList * __fastcall Duplicate() const;
  56. void __fastcall Clear();
  57. void __fastcall Add(const TRemoteToken & Token);
  58. void __fastcall AddUnique(const TRemoteToken & Token);
  59. bool __fastcall Exists(const UnicodeString & Name) const;
  60. const TRemoteToken * Find(unsigned int ID) const;
  61. const TRemoteToken * Find(const UnicodeString & Name) const;
  62. void __fastcall Log(TTerminal * Terminal, const wchar_t * Title);
  63. int __fastcall Count() const;
  64. const TRemoteToken * __fastcall Token(int Index) const;
  65. private:
  66. typedef std::vector<TRemoteToken> TTokens;
  67. typedef std::map<UnicodeString, size_t> TNameMap;
  68. typedef std::map<unsigned int, size_t> TIDMap;
  69. TTokens FTokens;
  70. TNameMap FNameMap;
  71. TIDMap FIDMap;
  72. };
  73. //---------------------------------------------------------------------------
  74. class TRemoteFile : public TPersistent
  75. {
  76. private:
  77. TRemoteFileList * FDirectory;
  78. TRemoteToken FOwner;
  79. TModificationFmt FModificationFmt;
  80. __int64 FSize;
  81. UnicodeString FFileName;
  82. UnicodeString FDisplayName;
  83. Integer FINodeBlocks;
  84. TDateTime FModification;
  85. TDateTime FLastAccess;
  86. TRemoteToken FGroup;
  87. Integer FIconIndex;
  88. Boolean FIsSymLink;
  89. TRemoteFile * FLinkedFile;
  90. TRemoteFile * FLinkedByFile;
  91. UnicodeString FLinkTo;
  92. TRights *FRights;
  93. UnicodeString FHumanRights;
  94. TTerminal *FTerminal;
  95. wchar_t FType;
  96. bool FCyclicLink;
  97. UnicodeString FFullFileName;
  98. int FIsHidden;
  99. UnicodeString FTypeName;
  100. int __fastcall GetAttr();
  101. bool __fastcall GetBrokenLink();
  102. bool __fastcall GetIsDirectory() const;
  103. TRemoteFile * __fastcall GetLinkedFile();
  104. void __fastcall SetLinkedFile(TRemoteFile * value);
  105. UnicodeString __fastcall GetModificationStr();
  106. void __fastcall SetModification(const TDateTime & value);
  107. void __fastcall SetListingStr(UnicodeString value);
  108. UnicodeString __fastcall GetListingStr();
  109. UnicodeString __fastcall GetRightsStr();
  110. wchar_t __fastcall GetType() const;
  111. void __fastcall SetType(wchar_t AType);
  112. void __fastcall SetTerminal(TTerminal * value);
  113. void __fastcall SetRights(TRights * value);
  114. UnicodeString __fastcall GetFullFileName() const;
  115. bool __fastcall GetHaveFullFileName() const;
  116. int __fastcall GetIconIndex() const;
  117. UnicodeString __fastcall GetTypeName();
  118. bool __fastcall GetIsHidden();
  119. void __fastcall SetIsHidden(bool value);
  120. bool __fastcall GetIsParentDirectory() const;
  121. bool __fastcall GetIsThisDirectory() const;
  122. bool __fastcall GetIsInaccesibleDirectory() const;
  123. UnicodeString __fastcall GetExtension();
  124. UnicodeString __fastcall GetUserModificationStr();
  125. void __fastcall LoadTypeInfo();
  126. __int64 __fastcall GetSize() const;
  127. protected:
  128. void __fastcall FindLinkedFile();
  129. public:
  130. __fastcall TRemoteFile(TRemoteFile * ALinkedByFile = NULL);
  131. virtual __fastcall ~TRemoteFile();
  132. TRemoteFile * __fastcall Duplicate(bool Standalone = true) const;
  133. void __fastcall ShiftTimeInSeconds(__int64 Seconds);
  134. bool __fastcall IsTimeShiftingApplicable();
  135. void __fastcall Complete();
  136. static bool __fastcall IsTimeShiftingApplicable(TModificationFmt ModificationFmt);
  137. static void __fastcall ShiftTimeInSeconds(TDateTime & DateTime, TModificationFmt ModificationFmt, __int64 Seconds);
  138. __property int Attr = { read = GetAttr };
  139. __property bool BrokenLink = { read = GetBrokenLink };
  140. __property TRemoteFileList * Directory = { read = FDirectory, write = FDirectory };
  141. __property UnicodeString RightsStr = { read = GetRightsStr };
  142. __property __int64 Size = { read = GetSize, write = FSize };
  143. __property TRemoteToken Owner = { read = FOwner, write = FOwner };
  144. __property TRemoteToken Group = { read = FGroup, write = FGroup };
  145. __property UnicodeString FileName = { read = FFileName, write = FFileName };
  146. __property UnicodeString DisplayName = { read = FDisplayName, write = FDisplayName };
  147. __property int INodeBlocks = { read = FINodeBlocks };
  148. __property TDateTime Modification = { read = FModification, write = SetModification };
  149. __property UnicodeString ModificationStr = { read = GetModificationStr };
  150. __property UnicodeString UserModificationStr = { read = GetUserModificationStr };
  151. __property TModificationFmt ModificationFmt = { read = FModificationFmt, write = FModificationFmt };
  152. __property TDateTime LastAccess = { read = FLastAccess, write = FLastAccess };
  153. __property bool IsSymLink = { read = FIsSymLink };
  154. __property bool IsDirectory = { read = GetIsDirectory };
  155. __property TRemoteFile * LinkedFile = { read = GetLinkedFile, write = SetLinkedFile };
  156. __property UnicodeString LinkTo = { read = FLinkTo, write = FLinkTo };
  157. __property UnicodeString ListingStr = { read = GetListingStr, write = SetListingStr };
  158. __property TRights * Rights = { read = FRights, write = SetRights };
  159. __property UnicodeString HumanRights = { read = FHumanRights, write = FHumanRights };
  160. __property TTerminal * Terminal = { read = FTerminal, write = SetTerminal };
  161. __property wchar_t Type = { read = GetType, write = SetType };
  162. __property UnicodeString FullFileName = { read = GetFullFileName, write = FFullFileName };
  163. __property bool HaveFullFileName = { read = GetHaveFullFileName };
  164. __property int IconIndex = { read = GetIconIndex };
  165. __property UnicodeString TypeName = { read = GetTypeName };
  166. __property bool IsHidden = { read = GetIsHidden, write = SetIsHidden };
  167. __property bool IsParentDirectory = { read = GetIsParentDirectory };
  168. __property bool IsThisDirectory = { read = GetIsThisDirectory };
  169. __property bool IsInaccesibleDirectory = { read=GetIsInaccesibleDirectory };
  170. __property UnicodeString Extension = { read=GetExtension };
  171. };
  172. //---------------------------------------------------------------------------
  173. class TRemoteDirectoryFile : public TRemoteFile
  174. {
  175. public:
  176. __fastcall TRemoteDirectoryFile();
  177. };
  178. //---------------------------------------------------------------------------
  179. class TRemoteParentDirectory : public TRemoteDirectoryFile
  180. {
  181. public:
  182. __fastcall TRemoteParentDirectory(TTerminal * Terminal);
  183. };
  184. //---------------------------------------------------------------------------
  185. class TRemoteFileList : public TObjectList
  186. {
  187. friend class TSCPFileSystem;
  188. friend class TSFTPFileSystem;
  189. friend class TFTPFileSystem;
  190. friend class TWebDAVFileSystem;
  191. friend class TS3FileSystem;
  192. protected:
  193. UnicodeString FDirectory;
  194. TDateTime FTimestamp;
  195. TRemoteFile * __fastcall GetFiles(Integer Index);
  196. virtual void __fastcall SetDirectory(UnicodeString value);
  197. UnicodeString __fastcall GetFullDirectory();
  198. Boolean __fastcall GetIsRoot();
  199. TRemoteFile * __fastcall GetParentDirectory();
  200. UnicodeString __fastcall GetParentPath();
  201. __int64 __fastcall GetTotalSize();
  202. public:
  203. __fastcall TRemoteFileList();
  204. virtual void __fastcall Reset();
  205. TRemoteFile * __fastcall FindFile(const UnicodeString &FileName);
  206. virtual void __fastcall DuplicateTo(TRemoteFileList * Copy);
  207. virtual void __fastcall AddFile(TRemoteFile * File);
  208. static TStrings * __fastcall CloneStrings(TStrings * List);
  209. __property UnicodeString Directory = { read = FDirectory, write = SetDirectory };
  210. __property TRemoteFile * Files[Integer Index] = { read = GetFiles };
  211. __property UnicodeString FullDirectory = { read=GetFullDirectory };
  212. __property Boolean IsRoot = { read = GetIsRoot };
  213. __property UnicodeString ParentPath = { read = GetParentPath };
  214. __property __int64 TotalSize = { read = GetTotalSize };
  215. __property TDateTime Timestamp = { read = FTimestamp };
  216. };
  217. //---------------------------------------------------------------------------
  218. class TRemoteDirectory : public TRemoteFileList
  219. {
  220. friend class TSCPFileSystem;
  221. friend class TSFTPFileSystem;
  222. private:
  223. Boolean FIncludeParentDirectory;
  224. Boolean FIncludeThisDirectory;
  225. TTerminal * FTerminal;
  226. TRemoteFile * FParentDirectory;
  227. TRemoteFile * FThisDirectory;
  228. virtual void __fastcall SetDirectory(UnicodeString value);
  229. Boolean __fastcall GetLoaded();
  230. void __fastcall SetIncludeParentDirectory(Boolean value);
  231. void __fastcall SetIncludeThisDirectory(Boolean value);
  232. void __fastcall ReleaseRelativeDirectories();
  233. public:
  234. __fastcall TRemoteDirectory(TTerminal * aTerminal, TRemoteDirectory * Template = NULL);
  235. virtual __fastcall ~TRemoteDirectory();
  236. virtual void __fastcall AddFile(TRemoteFile * File);
  237. virtual void __fastcall DuplicateTo(TRemoteFileList * Copy);
  238. virtual void __fastcall Reset();
  239. __property TTerminal * Terminal = { read = FTerminal, write = FTerminal };
  240. __property Boolean IncludeParentDirectory = { read = FIncludeParentDirectory, write = SetIncludeParentDirectory };
  241. __property Boolean IncludeThisDirectory = { read = FIncludeThisDirectory, write = SetIncludeThisDirectory };
  242. __property Boolean Loaded = { read = GetLoaded };
  243. __property TRemoteFile * ParentDirectory = { read = FParentDirectory };
  244. __property TRemoteFile * ThisDirectory = { read = FThisDirectory };
  245. };
  246. //---------------------------------------------------------------------------
  247. class TRemoteDirectoryCache : private TStringList
  248. {
  249. public:
  250. __fastcall TRemoteDirectoryCache();
  251. virtual __fastcall ~TRemoteDirectoryCache();
  252. bool __fastcall HasFileList(const UnicodeString Directory);
  253. bool __fastcall HasNewerFileList(const UnicodeString Directory, TDateTime Timestamp);
  254. bool __fastcall GetFileList(const UnicodeString Directory,
  255. TRemoteFileList * FileList);
  256. void __fastcall AddFileList(TRemoteFileList * FileList);
  257. void __fastcall ClearFileList(UnicodeString Directory, bool SubDirs);
  258. void __fastcall Clear();
  259. __property bool IsEmpty = { read = GetIsEmpty };
  260. protected:
  261. virtual void __fastcall Delete(int Index);
  262. private:
  263. TCriticalSection * FSection;
  264. bool __fastcall GetIsEmpty() const;
  265. void __fastcall DoClearFileList(UnicodeString Directory, bool SubDirs);
  266. };
  267. //---------------------------------------------------------------------------
  268. class TRemoteDirectoryChangesCache : private TStringList
  269. {
  270. public:
  271. __fastcall TRemoteDirectoryChangesCache(int MaxSize);
  272. void __fastcall AddDirectoryChange(const UnicodeString SourceDir,
  273. const UnicodeString Change, const UnicodeString TargetDir);
  274. void __fastcall ClearDirectoryChange(UnicodeString SourceDir);
  275. void __fastcall ClearDirectoryChangeTarget(UnicodeString TargetDir);
  276. bool __fastcall GetDirectoryChange(const UnicodeString SourceDir,
  277. const UnicodeString Change, UnicodeString & TargetDir);
  278. void __fastcall Clear();
  279. void __fastcall Serialize(UnicodeString & Data);
  280. void __fastcall Deserialize(const UnicodeString Data);
  281. __property bool IsEmpty = { read = GetIsEmpty };
  282. private:
  283. static bool __fastcall DirectoryChangeKey(const UnicodeString SourceDir,
  284. const UnicodeString Change, UnicodeString & Key);
  285. bool __fastcall GetIsEmpty() const;
  286. void __fastcall SetValue(const UnicodeString & Name, const UnicodeString & Value);
  287. UnicodeString __fastcall GetValue(const UnicodeString & Name);
  288. int FMaxSize;
  289. };
  290. //---------------------------------------------------------------------------
  291. class TRights
  292. {
  293. public:
  294. static const int TextLen = 9;
  295. static const wchar_t UndefSymbol = L'$';
  296. static const wchar_t UnsetSymbol = L'-';
  297. static const wchar_t BasicSymbols[];
  298. static const wchar_t CombinedSymbols[];
  299. static const wchar_t ExtendedSymbols[];
  300. static const wchar_t ModeGroups[];
  301. enum TRight {
  302. rrUserIDExec, rrGroupIDExec, rrStickyBit,
  303. rrUserRead, rrUserWrite, rrUserExec,
  304. rrGroupRead, rrGroupWrite, rrGroupExec,
  305. rrOtherRead, rrOtherWrite, rrOtherExec,
  306. rrFirst = rrUserIDExec, rrLast = rrOtherExec };
  307. enum TFlag {
  308. rfSetUID = 04000, rfSetGID = 02000, rfStickyBit = 01000,
  309. rfUserRead = 00400, rfUserWrite = 00200, rfUserExec = 00100,
  310. rfGroupRead = 00040, rfGroupWrite = 00020, rfGroupExec = 00010,
  311. rfOtherRead = 00004, rfOtherWrite = 00002, rfOtherExec = 00001,
  312. rfRead = 00444, rfWrite = 00222, rfExec = 00111,
  313. rfNo = 00000, rfDefault = 00644, rfAll = 00777,
  314. rfSpecials = 07000, rfAllSpecials = 07777 };
  315. enum TUnsupportedFlag {
  316. rfDirectory = 040000 };
  317. enum TState { rsNo, rsYes, rsUndef };
  318. public:
  319. static TFlag __fastcall RightToFlag(TRight Right);
  320. __fastcall TRights();
  321. __fastcall TRights(const TRights & Source);
  322. __fastcall TRights(unsigned short Number);
  323. void __fastcall Assign(const TRights * Source);
  324. void __fastcall AddExecute();
  325. void __fastcall AllUndef();
  326. bool __fastcall operator ==(const TRights & rhr) const;
  327. bool __fastcall operator ==(unsigned short rhr) const;
  328. bool __fastcall operator !=(const TRights & rhr) const;
  329. TRights & __fastcall operator =(const TRights & rhr);
  330. TRights & __fastcall operator =(unsigned short rhr);
  331. TRights __fastcall operator ~() const;
  332. TRights __fastcall operator &(unsigned short rhr) const;
  333. TRights __fastcall operator &(const TRights & rhr) const;
  334. TRights & __fastcall operator &=(unsigned short rhr);
  335. TRights & __fastcall operator &=(const TRights & rhr);
  336. TRights __fastcall operator |(unsigned short rhr) const;
  337. TRights __fastcall operator |(const TRights & rhr) const;
  338. TRights & __fastcall operator |=(unsigned short rhr);
  339. TRights & __fastcall operator |=(const TRights & rhr);
  340. __fastcall operator unsigned short() const;
  341. __fastcall operator unsigned long() const;
  342. __property bool AllowUndef = { read = FAllowUndef, write = SetAllowUndef };
  343. __property bool IsUndef = { read = GetIsUndef };
  344. __property UnicodeString ModeStr = { read = GetModeStr };
  345. __property UnicodeString SimplestStr = { read = GetSimplestStr };
  346. __property UnicodeString Octal = { read = GetOctal, write = SetOctal };
  347. __property unsigned short Number = { read = GetNumber, write = SetNumber };
  348. __property unsigned short NumberSet = { read = FSet };
  349. __property unsigned short NumberUnset = { read = FUnset };
  350. __property unsigned long NumberDecadic = { read = GetNumberDecadic };
  351. __property bool ReadOnly = { read = GetReadOnly, write = SetReadOnly };
  352. __property bool Right[TRight Right] = { read = GetRight, write = SetRight };
  353. __property TState RightUndef[TRight Right] = { read = GetRightUndef, write = SetRightUndef };
  354. __property UnicodeString Text = { read = GetText, write = SetText };
  355. __property bool Unknown = { read = FUnknown };
  356. private:
  357. bool FAllowUndef;
  358. unsigned short FSet;
  359. unsigned short FUnset;
  360. UnicodeString FText;
  361. bool FUnknown;
  362. bool __fastcall GetIsUndef() const;
  363. UnicodeString __fastcall GetModeStr() const;
  364. UnicodeString __fastcall GetSimplestStr() const;
  365. void __fastcall SetNumber(unsigned short value);
  366. UnicodeString __fastcall GetText() const;
  367. void __fastcall SetText(const UnicodeString & value);
  368. void __fastcall SetOctal(UnicodeString value);
  369. unsigned short __fastcall GetNumber() const;
  370. unsigned short __fastcall GetNumberSet() const;
  371. unsigned short __fastcall GetNumberUnset() const;
  372. unsigned long __fastcall GetNumberDecadic() const;
  373. UnicodeString __fastcall GetOctal() const;
  374. bool __fastcall GetReadOnly();
  375. bool __fastcall GetRight(TRight Right) const;
  376. TState __fastcall GetRightUndef(TRight Right) const;
  377. void __fastcall SetAllowUndef(bool value);
  378. void __fastcall SetReadOnly(bool value);
  379. void __fastcall SetRight(TRight Right, bool value);
  380. void __fastcall SetRightUndef(TRight Right, TState value);
  381. };
  382. //---------------------------------------------------------------------------
  383. enum TValidProperty { vpRights, vpGroup, vpOwner, vpModification, vpLastAccess };
  384. typedef Set<TValidProperty, vpRights, vpLastAccess> TValidProperties;
  385. class TRemoteProperties
  386. {
  387. public:
  388. TValidProperties Valid;
  389. bool Recursive;
  390. TRights Rights;
  391. bool AddXToDirectories;
  392. TRemoteToken Group;
  393. TRemoteToken Owner;
  394. __int64 Modification; // unix time
  395. __int64 LastAccess; // unix time
  396. __fastcall TRemoteProperties();
  397. __fastcall TRemoteProperties(const TRemoteProperties & rhp);
  398. bool __fastcall operator ==(const TRemoteProperties & rhp) const;
  399. bool __fastcall operator !=(const TRemoteProperties & rhp) const;
  400. void __fastcall Default();
  401. void __fastcall Load(THierarchicalStorage * Storage);
  402. void __fastcall Save(THierarchicalStorage * Storage) const;
  403. static TRemoteProperties __fastcall CommonProperties(TStrings * FileList);
  404. static TRemoteProperties __fastcall ChangedProperties(
  405. const TRemoteProperties & OriginalProperties, TRemoteProperties NewProperties);
  406. };
  407. //---------------------------------------------------------------------------
  408. bool __fastcall IsUnixStyleWindowsPath(const UnicodeString & Path);
  409. bool __fastcall UnixIsAbsolutePath(const UnicodeString & Path);
  410. UnicodeString __fastcall UnixIncludeTrailingBackslash(const UnicodeString Path);
  411. UnicodeString __fastcall UnixExcludeTrailingBackslash(const UnicodeString Path, bool Simple = false);
  412. UnicodeString __fastcall SimpleUnixExcludeTrailingBackslash(const UnicodeString Path);
  413. UnicodeString __fastcall UnixCombinePaths(const UnicodeString & Path1, const UnicodeString & Path2);
  414. UnicodeString __fastcall UnixExtractFileDir(const UnicodeString Path);
  415. UnicodeString __fastcall UnixExtractFilePath(const UnicodeString Path);
  416. UnicodeString __fastcall UnixExtractFileName(const UnicodeString Path);
  417. UnicodeString __fastcall UnixExtractFileExt(const UnicodeString Path);
  418. Boolean __fastcall UnixSamePath(const UnicodeString Path1, const UnicodeString Path2);
  419. bool __fastcall UnixIsChildPath(UnicodeString Parent, UnicodeString Child);
  420. bool __fastcall ExtractCommonPath(TStrings * Files, UnicodeString & Path);
  421. bool __fastcall UnixExtractCommonPath(TStrings * Files, UnicodeString & Path);
  422. UnicodeString __fastcall ExtractFileName(const UnicodeString & Path, bool Unix);
  423. bool __fastcall IsUnixRootPath(const UnicodeString Path);
  424. bool __fastcall IsUnixHiddenFile(const UnicodeString Path);
  425. UnicodeString __fastcall AbsolutePath(const UnicodeString & Base, const UnicodeString & Path);
  426. UnicodeString __fastcall FromUnixPath(const UnicodeString Path);
  427. UnicodeString __fastcall ToUnixPath(const UnicodeString Path);
  428. UnicodeString __fastcall MinimizeName(const UnicodeString FileName, int MaxLen, bool Unix);
  429. UnicodeString __fastcall MakeFileList(TStrings * FileList);
  430. TDateTime __fastcall ReduceDateTimePrecision(TDateTime DateTime,
  431. TModificationFmt Precision);
  432. TModificationFmt __fastcall LessDateTimePrecision(
  433. TModificationFmt Precision1, TModificationFmt Precision2);
  434. UnicodeString __fastcall UserModificationStr(TDateTime DateTime,
  435. TModificationFmt Precision);
  436. UnicodeString __fastcall ModificationStr(TDateTime DateTime,
  437. TModificationFmt Precision);
  438. int __fastcall FakeFileImageIndex(UnicodeString FileName, unsigned long Attrs = 0,
  439. UnicodeString * TypeName = NULL);
  440. bool __fastcall SameUserName(const UnicodeString & UserName1, const UnicodeString & UserName2);
  441. UnicodeString __fastcall FormatMultiFilesToOneConfirmation(const UnicodeString & Target, bool Unix);
  442. //---------------------------------------------------------------------------
  443. #endif