RemoteFiles.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466
  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. Integer FINodeBlocks;
  83. TDateTime FModification;
  84. TDateTime FLastAccess;
  85. TRemoteToken FGroup;
  86. Integer FIconIndex;
  87. Boolean FIsSymLink;
  88. TRemoteFile * FLinkedFile;
  89. TRemoteFile * FLinkedByFile;
  90. UnicodeString FLinkTo;
  91. TRights *FRights;
  92. UnicodeString FHumanRights;
  93. TTerminal *FTerminal;
  94. wchar_t FType;
  95. bool FSelected;
  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. __property int Attr = { read = GetAttr };
  137. __property bool BrokenLink = { read = GetBrokenLink };
  138. __property TRemoteFileList * Directory = { read = FDirectory, write = FDirectory };
  139. __property UnicodeString RightsStr = { read = GetRightsStr };
  140. __property __int64 Size = { read = GetSize, write = FSize };
  141. __property TRemoteToken Owner = { read = FOwner, write = FOwner };
  142. __property TRemoteToken Group = { read = FGroup, write = FGroup };
  143. __property UnicodeString FileName = { read = FFileName, write = FFileName };
  144. __property int INodeBlocks = { read = FINodeBlocks };
  145. __property TDateTime Modification = { read = FModification, write = SetModification };
  146. __property UnicodeString ModificationStr = { read = GetModificationStr };
  147. __property UnicodeString UserModificationStr = { read = GetUserModificationStr };
  148. __property TModificationFmt ModificationFmt = { read = FModificationFmt, write = FModificationFmt };
  149. __property TDateTime LastAccess = { read = FLastAccess, write = FLastAccess };
  150. __property bool IsSymLink = { read = FIsSymLink };
  151. __property bool IsDirectory = { read = GetIsDirectory };
  152. __property TRemoteFile * LinkedFile = { read = GetLinkedFile, write = SetLinkedFile };
  153. __property UnicodeString LinkTo = { read = FLinkTo, write = FLinkTo };
  154. __property UnicodeString ListingStr = { read = GetListingStr, write = SetListingStr };
  155. __property TRights * Rights = { read = FRights, write = SetRights };
  156. __property UnicodeString HumanRights = { read = FHumanRights, write = FHumanRights };
  157. __property TTerminal * Terminal = { read = FTerminal, write = SetTerminal };
  158. __property wchar_t Type = { read = GetType, write = SetType };
  159. __property bool Selected = { read=FSelected, write=FSelected };
  160. __property UnicodeString FullFileName = { read = GetFullFileName, write = FFullFileName };
  161. __property bool HaveFullFileName = { read = GetHaveFullFileName };
  162. __property int IconIndex = { read = GetIconIndex };
  163. __property UnicodeString TypeName = { read = GetTypeName };
  164. __property bool IsHidden = { read = GetIsHidden, write = SetIsHidden };
  165. __property bool IsParentDirectory = { read = GetIsParentDirectory };
  166. __property bool IsThisDirectory = { read = GetIsThisDirectory };
  167. __property bool IsInaccesibleDirectory = { read=GetIsInaccesibleDirectory };
  168. __property UnicodeString Extension = { read=GetExtension };
  169. };
  170. //---------------------------------------------------------------------------
  171. class TRemoteDirectoryFile : public TRemoteFile
  172. {
  173. public:
  174. __fastcall TRemoteDirectoryFile();
  175. };
  176. //---------------------------------------------------------------------------
  177. class TRemoteParentDirectory : public TRemoteDirectoryFile
  178. {
  179. public:
  180. __fastcall TRemoteParentDirectory(TTerminal * Terminal);
  181. };
  182. //---------------------------------------------------------------------------
  183. class TRemoteFileList : public TObjectList
  184. {
  185. friend class TSCPFileSystem;
  186. friend class TSFTPFileSystem;
  187. friend class TFTPFileSystem;
  188. friend class TWebDAVFileSystem;
  189. protected:
  190. UnicodeString FDirectory;
  191. TDateTime FTimestamp;
  192. TRemoteFile * __fastcall GetFiles(Integer Index);
  193. virtual void __fastcall SetDirectory(UnicodeString value);
  194. UnicodeString __fastcall GetFullDirectory();
  195. Boolean __fastcall GetIsRoot();
  196. TRemoteFile * __fastcall GetParentDirectory();
  197. UnicodeString __fastcall GetParentPath();
  198. __int64 __fastcall GetTotalSize();
  199. public:
  200. __fastcall TRemoteFileList();
  201. virtual void __fastcall Reset();
  202. TRemoteFile * __fastcall FindFile(const UnicodeString &FileName);
  203. virtual void __fastcall DuplicateTo(TRemoteFileList * Copy);
  204. virtual void __fastcall AddFile(TRemoteFile * File);
  205. __property UnicodeString Directory = { read = FDirectory, write = SetDirectory };
  206. __property TRemoteFile * Files[Integer Index] = { read = GetFiles };
  207. __property UnicodeString FullDirectory = { read=GetFullDirectory };
  208. __property Boolean IsRoot = { read = GetIsRoot };
  209. __property UnicodeString ParentPath = { read = GetParentPath };
  210. __property __int64 TotalSize = { read = GetTotalSize };
  211. __property TDateTime Timestamp = { read = FTimestamp };
  212. };
  213. //---------------------------------------------------------------------------
  214. class TRemoteDirectory : public TRemoteFileList
  215. {
  216. friend class TSCPFileSystem;
  217. friend class TSFTPFileSystem;
  218. private:
  219. Boolean FIncludeParentDirectory;
  220. Boolean FIncludeThisDirectory;
  221. TTerminal * FTerminal;
  222. TStrings * FSelectedFiles;
  223. TRemoteFile * FParentDirectory;
  224. TRemoteFile * FThisDirectory;
  225. virtual void __fastcall SetDirectory(UnicodeString value);
  226. TStrings * __fastcall GetSelectedFiles();
  227. Boolean __fastcall GetLoaded();
  228. void __fastcall SetIncludeParentDirectory(Boolean value);
  229. void __fastcall SetIncludeThisDirectory(Boolean value);
  230. void __fastcall ReleaseRelativeDirectories();
  231. public:
  232. __fastcall TRemoteDirectory(TTerminal * aTerminal, TRemoteDirectory * Template = NULL);
  233. virtual __fastcall ~TRemoteDirectory();
  234. virtual void __fastcall AddFile(TRemoteFile * File);
  235. virtual void __fastcall DuplicateTo(TRemoteFileList * Copy);
  236. virtual void __fastcall Reset();
  237. __property TTerminal * Terminal = { read = FTerminal, write = FTerminal };
  238. __property TStrings * SelectedFiles = { read=GetSelectedFiles };
  239. __property Boolean IncludeParentDirectory = { read = FIncludeParentDirectory, write = SetIncludeParentDirectory };
  240. __property Boolean IncludeThisDirectory = { read = FIncludeThisDirectory, write = SetIncludeThisDirectory };
  241. __property Boolean Loaded = { read = GetLoaded };
  242. __property TRemoteFile * ParentDirectory = { read = FParentDirectory };
  243. __property TRemoteFile * ThisDirectory = { read = FThisDirectory };
  244. };
  245. //---------------------------------------------------------------------------
  246. class TRemoteDirectoryCache : private TStringList
  247. {
  248. public:
  249. __fastcall TRemoteDirectoryCache();
  250. virtual __fastcall ~TRemoteDirectoryCache();
  251. bool __fastcall HasFileList(const UnicodeString Directory);
  252. bool __fastcall HasNewerFileList(const UnicodeString Directory, TDateTime Timestamp);
  253. bool __fastcall GetFileList(const UnicodeString Directory,
  254. TRemoteFileList * FileList);
  255. void __fastcall AddFileList(TRemoteFileList * FileList);
  256. void __fastcall ClearFileList(UnicodeString Directory, bool SubDirs);
  257. void __fastcall Clear();
  258. __property bool IsEmpty = { read = GetIsEmpty };
  259. protected:
  260. virtual void __fastcall Delete(int Index);
  261. private:
  262. TCriticalSection * FSection;
  263. bool __fastcall GetIsEmpty() const;
  264. void __fastcall DoClearFileList(UnicodeString Directory, bool SubDirs);
  265. };
  266. //---------------------------------------------------------------------------
  267. class TRemoteDirectoryChangesCache : private TStringList
  268. {
  269. public:
  270. __fastcall TRemoteDirectoryChangesCache(int MaxSize);
  271. void __fastcall AddDirectoryChange(const UnicodeString SourceDir,
  272. const UnicodeString Change, const UnicodeString TargetDir);
  273. void __fastcall ClearDirectoryChange(UnicodeString SourceDir);
  274. void __fastcall ClearDirectoryChangeTarget(UnicodeString TargetDir);
  275. bool __fastcall GetDirectoryChange(const UnicodeString SourceDir,
  276. const UnicodeString Change, UnicodeString & TargetDir);
  277. void __fastcall Clear();
  278. void __fastcall Serialize(UnicodeString & Data);
  279. void __fastcall Deserialize(const UnicodeString Data);
  280. __property bool IsEmpty = { read = GetIsEmpty };
  281. private:
  282. static bool __fastcall DirectoryChangeKey(const UnicodeString SourceDir,
  283. const UnicodeString Change, UnicodeString & Key);
  284. bool __fastcall GetIsEmpty() const;
  285. void __fastcall SetValue(const UnicodeString & Name, const UnicodeString & Value);
  286. UnicodeString __fastcall GetValue(const UnicodeString & Name);
  287. int FMaxSize;
  288. };
  289. //---------------------------------------------------------------------------
  290. class TRights
  291. {
  292. public:
  293. static const int TextLen = 9;
  294. static const wchar_t UndefSymbol = L'$';
  295. static const wchar_t UnsetSymbol = L'-';
  296. static const wchar_t BasicSymbols[];
  297. static const wchar_t CombinedSymbols[];
  298. static const wchar_t ExtendedSymbols[];
  299. static const wchar_t ModeGroups[];
  300. enum TRight {
  301. rrUserIDExec, rrGroupIDExec, rrStickyBit,
  302. rrUserRead, rrUserWrite, rrUserExec,
  303. rrGroupRead, rrGroupWrite, rrGroupExec,
  304. rrOtherRead, rrOtherWrite, rrOtherExec,
  305. rrFirst = rrUserIDExec, rrLast = rrOtherExec };
  306. enum TFlag {
  307. rfSetUID = 04000, rfSetGID = 02000, rfStickyBit = 01000,
  308. rfUserRead = 00400, rfUserWrite = 00200, rfUserExec = 00100,
  309. rfGroupRead = 00040, rfGroupWrite = 00020, rfGroupExec = 00010,
  310. rfOtherRead = 00004, rfOtherWrite = 00002, rfOtherExec = 00001,
  311. rfRead = 00444, rfWrite = 00222, rfExec = 00111,
  312. rfNo = 00000, rfDefault = 00644, rfAll = 00777,
  313. rfSpecials = 07000, rfAllSpecials = 07777 };
  314. enum TUnsupportedFlag {
  315. rfDirectory = 040000 };
  316. enum TState { rsNo, rsYes, rsUndef };
  317. public:
  318. static TFlag __fastcall RightToFlag(TRight Right);
  319. __fastcall TRights();
  320. __fastcall TRights(const TRights & Source);
  321. __fastcall TRights(unsigned short Number);
  322. void __fastcall Assign(const TRights * Source);
  323. void __fastcall AddExecute();
  324. void __fastcall AllUndef();
  325. bool __fastcall operator ==(const TRights & rhr) const;
  326. bool __fastcall operator ==(unsigned short rhr) const;
  327. bool __fastcall operator !=(const TRights & rhr) const;
  328. TRights & __fastcall operator =(const TRights & rhr);
  329. TRights & __fastcall operator =(unsigned short rhr);
  330. TRights __fastcall operator ~() const;
  331. TRights __fastcall operator &(unsigned short rhr) const;
  332. TRights __fastcall operator &(const TRights & rhr) const;
  333. TRights & __fastcall operator &=(unsigned short rhr);
  334. TRights & __fastcall operator &=(const TRights & rhr);
  335. TRights __fastcall operator |(unsigned short rhr) const;
  336. TRights __fastcall operator |(const TRights & rhr) const;
  337. TRights & __fastcall operator |=(unsigned short rhr);
  338. TRights & __fastcall operator |=(const TRights & rhr);
  339. __fastcall operator unsigned short() const;
  340. __fastcall operator unsigned long() const;
  341. __property bool AllowUndef = { read = FAllowUndef, write = SetAllowUndef };
  342. __property bool IsUndef = { read = GetIsUndef };
  343. __property UnicodeString ModeStr = { read = GetModeStr };
  344. __property UnicodeString SimplestStr = { read = GetSimplestStr };
  345. __property UnicodeString Octal = { read = GetOctal, write = SetOctal };
  346. __property unsigned short Number = { read = GetNumber, write = SetNumber };
  347. __property unsigned short NumberSet = { read = FSet };
  348. __property unsigned short NumberUnset = { read = FUnset };
  349. __property unsigned long NumberDecadic = { read = GetNumberDecadic };
  350. __property bool ReadOnly = { read = GetReadOnly, write = SetReadOnly };
  351. __property bool Right[TRight Right] = { read = GetRight, write = SetRight };
  352. __property TState RightUndef[TRight Right] = { read = GetRightUndef, write = SetRightUndef };
  353. __property UnicodeString Text = { read = GetText, write = SetText };
  354. __property bool Unknown = { read = FUnknown };
  355. private:
  356. bool FAllowUndef;
  357. unsigned short FSet;
  358. unsigned short FUnset;
  359. UnicodeString FText;
  360. bool FUnknown;
  361. bool __fastcall GetIsUndef() const;
  362. UnicodeString __fastcall GetModeStr() const;
  363. UnicodeString __fastcall GetSimplestStr() const;
  364. void __fastcall SetNumber(unsigned short value);
  365. UnicodeString __fastcall GetText() const;
  366. void __fastcall SetText(const UnicodeString & value);
  367. void __fastcall SetOctal(UnicodeString value);
  368. unsigned short __fastcall GetNumber() const;
  369. unsigned short __fastcall GetNumberSet() const;
  370. unsigned short __fastcall GetNumberUnset() const;
  371. unsigned long __fastcall GetNumberDecadic() const;
  372. UnicodeString __fastcall GetOctal() const;
  373. bool __fastcall GetReadOnly();
  374. bool __fastcall GetRight(TRight Right) const;
  375. TState __fastcall GetRightUndef(TRight Right) const;
  376. void __fastcall SetAllowUndef(bool value);
  377. void __fastcall SetReadOnly(bool value);
  378. void __fastcall SetRight(TRight Right, bool value);
  379. void __fastcall SetRightUndef(TRight Right, TState value);
  380. };
  381. //---------------------------------------------------------------------------
  382. enum TValidProperty { vpRights, vpGroup, vpOwner, vpModification, vpLastAccess };
  383. typedef Set<TValidProperty, vpRights, vpLastAccess> TValidProperties;
  384. class TRemoteProperties
  385. {
  386. public:
  387. TValidProperties Valid;
  388. bool Recursive;
  389. TRights Rights;
  390. bool AddXToDirectories;
  391. TRemoteToken Group;
  392. TRemoteToken Owner;
  393. __int64 Modification; // unix time
  394. __int64 LastAccess; // unix time
  395. __fastcall TRemoteProperties();
  396. __fastcall TRemoteProperties(const TRemoteProperties & rhp);
  397. bool __fastcall operator ==(const TRemoteProperties & rhp) const;
  398. bool __fastcall operator !=(const TRemoteProperties & rhp) const;
  399. void __fastcall Default();
  400. void __fastcall Load(THierarchicalStorage * Storage);
  401. void __fastcall Save(THierarchicalStorage * Storage) const;
  402. static TRemoteProperties __fastcall CommonProperties(TStrings * FileList);
  403. static TRemoteProperties __fastcall ChangedProperties(
  404. const TRemoteProperties & OriginalProperties, TRemoteProperties NewProperties);
  405. };
  406. //---------------------------------------------------------------------------
  407. bool __fastcall IsUnixStyleWindowsPath(const UnicodeString & Path);
  408. bool __fastcall UnixIsAbsolutePath(const UnicodeString & Path);
  409. UnicodeString __fastcall UnixIncludeTrailingBackslash(const UnicodeString Path);
  410. UnicodeString __fastcall UnixExcludeTrailingBackslash(const UnicodeString Path, bool Simple = false);
  411. UnicodeString __fastcall SimpleUnixExcludeTrailingBackslash(const UnicodeString Path);
  412. UnicodeString __fastcall UnixExtractFileDir(const UnicodeString Path);
  413. UnicodeString __fastcall UnixExtractFilePath(const UnicodeString Path);
  414. UnicodeString __fastcall UnixExtractFileName(const UnicodeString Path);
  415. UnicodeString __fastcall UnixExtractFileExt(const UnicodeString Path);
  416. Boolean __fastcall UnixSamePath(const UnicodeString Path1, const UnicodeString Path2);
  417. bool __fastcall UnixIsChildPath(UnicodeString Parent, UnicodeString Child);
  418. bool __fastcall ExtractCommonPath(TStrings * Files, UnicodeString & Path);
  419. bool __fastcall UnixExtractCommonPath(TStrings * Files, UnicodeString & Path);
  420. UnicodeString __fastcall ExtractFileName(const UnicodeString & Path, bool Unix);
  421. bool __fastcall IsUnixRootPath(const UnicodeString Path);
  422. bool __fastcall IsUnixHiddenFile(const UnicodeString Path);
  423. UnicodeString __fastcall AbsolutePath(const UnicodeString & Base, const UnicodeString & Path);
  424. UnicodeString __fastcall FromUnixPath(const UnicodeString Path);
  425. UnicodeString __fastcall ToUnixPath(const UnicodeString Path);
  426. UnicodeString __fastcall MinimizeName(const UnicodeString FileName, int MaxLen, bool Unix);
  427. UnicodeString __fastcall MakeFileList(TStrings * FileList);
  428. TDateTime __fastcall ReduceDateTimePrecision(TDateTime DateTime,
  429. TModificationFmt Precision);
  430. TModificationFmt __fastcall LessDateTimePrecision(
  431. TModificationFmt Precision1, TModificationFmt Precision2);
  432. UnicodeString __fastcall UserModificationStr(TDateTime DateTime,
  433. TModificationFmt Precision);
  434. UnicodeString __fastcall ModificationStr(TDateTime DateTime,
  435. TModificationFmt Precision);
  436. int __fastcall FakeFileImageIndex(UnicodeString FileName, unsigned long Attrs = 0,
  437. UnicodeString * TypeName = NULL);
  438. bool __fastcall SameUserName(const UnicodeString & UserName1, const UnicodeString & UserName2);
  439. //---------------------------------------------------------------------------
  440. #endif