UPD: Prepare FPC 3.0 support

This commit is contained in:
Alexander Koblov 2015-10-23 19:27:05 +00:00
commit db5cb3beba
146 changed files with 935 additions and 918 deletions

View file

@ -62,8 +62,8 @@ type
public
constructor Create(AOwner: TComponent; ATemp: Boolean); overload;
procedure Assign(Source: TPersistent); override;
function LoadFromFile(const FileName: UTF8String): Boolean;
function SaveToFile(const FileName: UTF8String): Boolean;
function LoadFromFile(const FileName: String): Boolean;
function SaveToFile(const FileName: String): Boolean;
function GetHighlighterByExt(const sExtension: string): TSynCustomHighlighter;
procedure SetHighlighter(SynEdit: TCustomSynEdit; Highlighter: TSynCustomHighlighter);
property Changed: Boolean read FChanged write FChanged;
@ -173,7 +173,7 @@ var
I: Integer = 0;
J, K: Integer;
aFile: TStringListEx;
s, sValue: UTF8String;
s, sValue: String;
Highlighter: TSynCustomHighlighter;
Attribute: TSynHighlighterAttributes;
begin
@ -325,7 +325,7 @@ begin
end;
end;
function TdmHighl.LoadFromFile(const FileName: UTF8String): Boolean;
function TdmHighl.LoadFromFile(const FileName: String): Boolean;
var
J: LongInt;
Config: TXmlConfig = nil;
@ -390,7 +390,7 @@ begin
end;
end;
function TdmHighl.SaveToFile(const FileName: UTF8String): Boolean;
function TdmHighl.SaveToFile(const FileName: String): Boolean;
var
I: LongInt;
Config: TXmlConfig;

View file

@ -1108,6 +1108,7 @@ end;"/>
<Unit127>
<Filename Value="filesources\ufilesourcesetfilepropertyoperation.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="uFileSourceSetFilePropertyOperation"/>
</Unit127>
<Unit128>
<Filename Value="filesources\ufilesourcesplitoperation.pas"/>
@ -1566,6 +1567,7 @@ end;"/>
<Filename Value="frames\fsearchplugin.pas"/>
<IsPartOfProject Value="True"/>
<HasResources Value="True"/>
<UnitName Value="fSearchPlugin"/>
</Unit220>
<Unit221>
<Filename Value="udiffonp.pas"/>

View file

@ -90,8 +90,10 @@ begin
{$IFDEF MSWINDOWS}
uMyWindows.InitErrorMode;
{$IF (FPC_FULLVERSION < 30000) OR DEFINED(DisableUTF8RTL)}
uMyWindows.FixCommandLineToUTF8;
{$ENDIF}
{$ENDIF}
// Fix default BidiMode
// see http://bugs.freepascal.org/view.php?id=22044

View file

@ -196,7 +196,7 @@ type
DsxPlugins: TDSXModuleList;
FSearchingActive: Boolean;
FFrmAttributesEdit: TfrmAttributesEdit;
FLastTemplateName: UTF8String;
FLastTemplateName: String;
FLastSearchTemplate: TSearchTemplate;
FUpdateTimer: TTimer;
FUpdating: Boolean;
@ -238,8 +238,8 @@ var
For which file view the find dialog is executed,
to get file source, current path and a list of selected files.)
}
procedure ShowFindDlg(FileView: TFileView; const TemplateName: UTF8String);
function ShowDefineTemplateDlg(var TemplateName: UTF8String): Boolean;
procedure ShowFindDlg(FileView: TFileView; const TemplateName: String);
function ShowDefineTemplateDlg(var TemplateName: String): Boolean;
function ShowUseTemplateDlg(var Template: TSearchTemplate): Boolean;
implementation
@ -291,7 +291,7 @@ begin
Application.ProcessMessages;
end;
procedure ShowFindDlg(FileView: TFileView; const TemplateName: UTF8String);
procedure ShowFindDlg(FileView: TFileView; const TemplateName: String);
var
ASelectedFiles: TFiles = nil;
I: Integer;
@ -333,7 +333,7 @@ begin
end;
end;
function ShowDefineTemplateDlg(var TemplateName: UTF8String): Boolean;
function ShowDefineTemplateDlg(var TemplateName: String): Boolean;
var
AIndex: Integer;
AForm: TfrmFindDlg;
@ -906,7 +906,7 @@ end;
procedure TfrmFindDlg.btnStartClick(Sender: TObject);
var
sTemp, sPath : UTF8String;
sTemp, sPath : String;
sr: TDsxSearchRecord;
SearchTemplate, TmpTemplate: TSearchTemplateRec;
PassedSelectedFiles: TStringList = nil;
@ -1520,7 +1520,7 @@ end;
function TfrmFindDlg.InvalidRegExpr(AChecked: Boolean; const ARegExpr: String): Boolean;
var
sMsg: UTF8String;
sMsg: String;
begin
Result:= False;
if AChecked then
@ -1547,7 +1547,7 @@ end;
procedure TfrmFindDlg.SaveTemplate(SaveStartingPath: Boolean);
var
sName: UTF8String;
sName: String;
SearchTemplate: TSearchTemplate;
SearchRec: TSearchTemplateRec;
begin

View file

@ -47,13 +47,13 @@ type
procedure FormShow(Sender: TObject);
procedure lbHashAlgorithmSelectionChange(Sender: TObject; User: boolean);
private
FFileName: UTF8String;
FFileName: String;
FAlgorithm: THashAlgorithm;
public
{ public declarations }
end;
function ShowCalcCheckSum(var sFileName: UTF8String; out SeparateFile: Boolean;
function ShowCalcCheckSum(var sFileName: String; out SeparateFile: Boolean;
out HashAlgorithm: THashAlgorithm; out OpenFileAfterJobCompleted: Boolean;
out QueueId: TOperationsManagerQueueIdentifier): Boolean;
@ -67,7 +67,7 @@ implementation
uses
uGlobs, uLng;
function ShowCalcCheckSum(var sFileName: UTF8String; out SeparateFile: Boolean;
function ShowCalcCheckSum(var sFileName: String; out SeparateFile: Boolean;
out HashAlgorithm: THashAlgorithm; out OpenFileAfterJobCompleted: Boolean;
out QueueId: TOperationsManagerQueueIdentifier): Boolean;
begin

View file

@ -42,9 +42,9 @@ type
procedure seCheckSumVerifySpecialLineColors(Sender: TObject; Line: integer;
var Special: boolean; var FG, BG: TColor);
private
procedure AddHeader(const aText: UTF8String; aCount: Integer; aColor: TColor);
procedure AddHeader(const aText: String; aCount: Integer; aColor: TColor);
procedure ProcessResult(const aResult: TDynamicStringArray;
const aText: UTF8String; aColor: TColor);
const aText: String; aColor: TColor);
public
{ public declarations }
end;
@ -107,7 +107,7 @@ begin
FG:= TColor(PtrInt(seCheckSumVerify.Lines.Objects[Line - 1]));
end;
procedure TfrmCheckSumVerify.AddHeader(const aText: UTF8String; aCount: Integer; aColor: TColor);
procedure TfrmCheckSumVerify.AddHeader(const aText: String; aCount: Integer; aColor: TColor);
begin
if aCount = 0 then
seCheckSumVerify.Lines.Add(#32 + aText + #32 + IntToStr(aCount))
@ -116,7 +116,7 @@ begin
end;
procedure TfrmCheckSumVerify.ProcessResult(const aResult: TDynamicStringArray;
const aText: UTF8String; aColor: TColor);
const aText: String; aColor: TColor);
var
I: Integer;
begin

View file

@ -81,7 +81,7 @@ end;
procedure TfrmConnectionManager.btnAddClick(Sender: TObject);
var
WfxPluginFileSource: IWfxPluginFileSource;
Connection: UTF8String;
Connection: String;
begin
{
WfxPluginFileSource:= PFileSourceRecord(tvConnections.Selected.Data)^.FileSource as IWfxPluginFileSource;
@ -101,7 +101,7 @@ var
WfxPluginFileSource: IWfxPluginFileSource;
Connection,
RemotePath,
RootPath: UTF8String;
RootPath: String;
begin
{
WfxPluginFileSource:= PFileSourceRecord(tvConnections.Selected.Parent.Data)^.FileSource as IWfxPluginFileSource;
@ -129,7 +129,7 @@ end;
procedure TfrmConnectionManager.btnDeleteClick(Sender: TObject);
var
WfxPluginFileSource: IWfxPluginFileSource;
Connection: UTF8String;
Connection: String;
begin
{
WfxPluginFileSource:= PFileSourceRecord(tvConnections.Selected.Parent.Data)^.FileSource as IWfxPluginFileSource;
@ -149,7 +149,7 @@ end;
procedure TfrmConnectionManager.btnEditClick(Sender: TObject);
var
WfxPluginFileSource: IWfxPluginFileSource;
Connection: UTF8String;
Connection: String;
begin
{
WfxPluginFileSource:= PFileSourceRecord(tvConnections.Selected.Parent.Data)^.FileSource as IWfxPluginFileSource;
@ -180,7 +180,7 @@ var
I, J: Integer;
WfxPluginFileSource: IWfxPluginFileSource = nil;
sModuleFileName,
Connection: UTF8String;
Connection: String;
Node, SubNode: TTreeNode;
begin
{

View file

@ -103,7 +103,7 @@ uses
function InputBox(Caption, Prompt: PAnsiChar; MaskInput: LongBool; Value: PAnsiChar; ValueMaxLen: Integer): LongBool; dcpcall;
var
sValue: UTF8String;
sValue: String;
begin
Result:= False;
sValue:= StrPas(Value);
@ -119,7 +119,7 @@ begin
Result:= ShowMessageBox(Text, Caption, Flags);
end;
procedure SetDialogBoxResourceLRS(LRSData: UTF8String);
procedure SetDialogBoxResourceLRS(LRSData: String);
var
LResource: TLResource;
begin
@ -130,7 +130,7 @@ begin
LazarusResources.Add('TDialogBox','FORMDATA', LRSData);
end;
procedure SetDialogBoxResourceLFM(LFMData: UTF8String);
procedure SetDialogBoxResourceLFM(LFMData: String);
var
LFMStream: TStringStream = nil;
BinStream: TStringStream = nil;
@ -168,7 +168,7 @@ end;
function DialogBoxLFM(LFMData: Pointer; DataSize: LongWord; DlgProc: TDlgProc): LongBool;dcpcall;
var
DataString: UTF8String;
DataString: String;
begin
if Assigned(LFMData) and (DataSize > 0) then
begin
@ -182,7 +182,7 @@ end;
function DialogBoxLRS(LRSData: Pointer; DataSize: LongWord; DlgProc: TDlgProc): LongBool; dcpcall;
var
DataString: UTF8String;
DataString: String;
begin
if Assigned(LRSData) and (DataSize > 0) then
begin
@ -217,7 +217,7 @@ function SendDlgMsg(pDlg: PtrUInt; DlgItemName: PAnsiChar; Msg, wParam, lParam:
var
DialogBox: TDialogBox;
Control: TControl;
sText: UTF8String;
sText: String;
I: Integer;
Rect: TRect;
Key: Word;
@ -601,7 +601,7 @@ end;
procedure TDialogBox.EditChange(Sender: TObject);
var
sText: UTF8String;
sText: String;
begin
if Assigned(fDlgProc) then
begin

View file

@ -221,10 +221,10 @@ type
procedure ChooseEncoding(SynDiffEdit: TSynDiffEdit);
procedure ChooseEncoding(MenuItem: TMenuItem; Encoding: String);
procedure FillEncodingMenu(TheOwner: TMenuItem; MenuHandler: TNotifyEvent; GroupIndex: LongInt);
procedure LoadFromFile(SynDiffEdit: TSynDiffEdit; const FileName: UTF8String);
procedure SaveToFile(SynDiffEdit: TSynDiffEdit; const FileName: UTF8String);
procedure OpenFileLeft(const FileName: UTF8String);
procedure OpenFileRight(const FileName: UTF8String);
procedure LoadFromFile(SynDiffEdit: TSynDiffEdit; const FileName: String);
procedure SaveToFile(SynDiffEdit: TSynDiffEdit; const FileName: String);
procedure OpenFileLeft(const FileName: String);
procedure OpenFileRight(const FileName: String);
procedure SetEncodingLeft(Sender: TObject);
procedure SetEncodingRight(Sender: TObject);
procedure SynDiffEditEnter(Sender: TObject);
@ -248,7 +248,7 @@ type
procedure cm_SaveRight(const Params: array of string);
end;
procedure ShowDiffer(const FileNameLeft, FileNameRight: UTF8String);
procedure ShowDiffer(const FileNameLeft, FileNameRight: String);
implementation
@ -261,7 +261,7 @@ uses
const
HotkeysCategory = 'Differ';
procedure ShowDiffer(const FileNameLeft, FileNameRight: UTF8String);
procedure ShowDiffer(const FileNameLeft, FileNameRight: String);
begin
with TfrmDiffer.Create(Application) do
begin
@ -1021,7 +1021,7 @@ begin
end;
end;
procedure TfrmDiffer.LoadFromFile(SynDiffEdit: TSynDiffEdit; const FileName: UTF8String);
procedure TfrmDiffer.LoadFromFile(SynDiffEdit: TSynDiffEdit; const FileName: String);
var
fsFileStream: TFileStreamEx = nil;
begin
@ -1053,7 +1053,7 @@ begin
end;
procedure TfrmDiffer.SaveToFile(SynDiffEdit: TSynDiffEdit;
const FileName: UTF8String);
const FileName: String);
var
slStringList: TStringListEx;
begin
@ -1087,7 +1087,7 @@ begin
end;
end;
procedure TfrmDiffer.OpenFileLeft(const FileName: UTF8String);
procedure TfrmDiffer.OpenFileLeft(const FileName: String);
begin
if not mbFileExists(FileName) then Exit;
if actBinaryCompare.Checked then
@ -1106,7 +1106,7 @@ begin
end;
end;
procedure TfrmDiffer.OpenFileRight(const FileName: UTF8String);
procedure TfrmDiffer.OpenFileRight(const FileName: String);
begin
if not mbFileExists(FileName) then Exit;
if actBinaryCompare.Checked then

View file

@ -154,7 +154,7 @@ type
bSearchSelectionOnly:Boolean;
bSearchWholeWords:Boolean;
bSearchRegExp:Boolean;
FFileName: UTF8String;
FFileName: String;
sSearchText, sReplaceText:String;
sEncodingIn,
sEncodingOut,
@ -166,8 +166,8 @@ type
Saves editor content to a file.
@returns(@true if successful)
}
function SaveFile(const aFileName: UTF8String): Boolean;
procedure SetFileName(const AValue: UTF8String);
function SaveFile(const aFileName: String): Boolean;
procedure SetFileName(const AValue: String);
public
{ Public declarations }
@ -181,7 +181,7 @@ type
Opens a file.
@returns(@true if successful)
}
function OpenFile(const aFileName: UTF8String): Boolean;
function OpenFile(const aFileName: String): Boolean;
procedure UpdateStatus;
procedure SetEncodingIn(Sender:TObject);
procedure SetEncodingOut(Sender:TObject);
@ -190,7 +190,7 @@ type
procedure DoSearchReplaceText(AReplace: boolean; ABackwards: boolean);
procedure ShowSearchReplaceDialog(AReplace: boolean);
property FileName: UTF8String read FFileName write SetFileName;
property FileName: String read FFileName write SetFileName;
end;
procedure ShowEditor(WaitData: TEditorWaitData);
@ -333,7 +333,7 @@ begin
Editor.Lines.TextLineBreakStyle:= tlbsLF;
end;
function TfrmEditor.OpenFile(const aFileName: UTF8String): Boolean;
function TfrmEditor.OpenFile(const aFileName: String): Boolean;
var
Buffer: AnsiString;
Reader: TFileStreamEx;
@ -418,7 +418,7 @@ begin
UpdateStatus;
end;
function TfrmEditor.SaveFile(const aFileName: UTF8String): Boolean;
function TfrmEditor.SaveFile(const aFileName: String): Boolean;
var
TextOut: String;
Encoding: String;
@ -489,7 +489,7 @@ begin
end;
end;
procedure TfrmEditor.SetFileName(const AValue: UTF8String);
procedure TfrmEditor.SetFileName(const AValue: String);
begin
if FFileName = AValue then
Exit;

View file

@ -54,17 +54,17 @@ type
procedure FormCreate(Sender: TObject);
private
{ private declarations }
FArcType: UTF8String;
FArcType: String;
procedure SwitchOptions;
procedure ExtractArchive(ArchiveFileSource: IArchiveFileSource; TargetFileSource: IFileSource;
const TargetPath: UTF8String);
const TargetPath: String);
public
{ public declarations }
end;
// Frees 'SourceFiles'.
procedure ShowExtractDlg(SourceFileSource: IFileSource; var SourceFiles: TFiles;
TargetFileSource: IFileSource; sDestPath: UTF8String);
TargetFileSource: IFileSource; sDestPath: String);
implementation
@ -86,7 +86,7 @@ uses
uMasks;
procedure ShowExtractDlg(SourceFileSource: IFileSource; var SourceFiles: TFiles;
TargetFileSource: IFileSource; sDestPath: UTF8String);
TargetFileSource: IFileSource; sDestPath: String);
var
I: integer;
Operation: TFileSourceOperation;
@ -231,7 +231,7 @@ begin
end;
procedure TfrmExtractDlg.ExtractArchive(ArchiveFileSource: IArchiveFileSource;
TargetFileSource: IFileSource; const TargetPath: UTF8String);
TargetFileSource: IFileSource; const TargetPath: String);
var
FilesToExtract: TFiles;
Operation: TFileSourceOperation;

View file

@ -46,7 +46,7 @@ type
private
FFileSource: IFileSource;
public
constructor Create(TheOwner: TComponent; aFileSource: IFileSource; const FileName, FromPath: UTF8String); reintroduce;
constructor Create(TheOwner: TComponent; aFileSource: IFileSource; const FileName, FromPath: String); reintroduce;
destructor Destroy; override;
end;
@ -65,7 +65,7 @@ var
TempFileSource: ITempFileSystemFileSource = nil;
Operation: TFileSourceOperation = nil;
CurrentDir,
FileName: UTF8String;
FileName: String;
begin
Result:= False;
try
@ -117,7 +117,7 @@ begin
end;
constructor TfrmFileExecuteYourSelf.Create(TheOwner: TComponent;
aFileSource: IFileSource; const FileName, FromPath: UTF8String);
aFileSource: IFileSource; const FileName, FromPath: String);
begin
inherited Create(TheOwner);
FFileSource:= aFileSource;

View file

@ -382,7 +382,7 @@ function TFileSystemCalcChecksumOperation.VerifyChecksumProcessFile(
aFile: TFile; ExpectedChecksum: String): Boolean;
var
sCheckSum: String;
sFileName: UTF8String;
sFileName: String;
begin
Result:= False;
sFileName:= ExtractDirLevel(FFullFilesTree.Path, aFile.Path) + aFile.Name;

View file

@ -18,7 +18,7 @@ type
private
FFullFilesTreeToCombine: TFiles; // source files including all files
FStatistics: TFileSourceCombineOperationStatistics; // local copy of statistics
FTargetPath: UTF8String;
FTargetPath: String;
FBuffer: Pointer;
FBufferSize: LongWord;
FCheckFreeSpace: Boolean;
@ -29,7 +29,7 @@ type
procedure ShowError(sMessage: String);
procedure LogMessage(sMessage: String; logOptions: TLogOptions; logMsgType: TLogMsgType);
function TryToGetInfroFromTheCRC32VerificationFile:boolean;
procedure BegForPresenceOfThisFile(aFilename: UTF8String);
procedure BegForPresenceOfThisFile(aFilename: String);
public
constructor Create(aFileSource: IFileSource;
@ -86,7 +86,7 @@ end;
procedure TFileSystemCombineOperation.Initialize;
var
MaybeFileIndex: integer;
MaybeAdditionalSourceFilename: UTF8String;
MaybeAdditionalSourceFilename: String;
MaybeFile: TFile;
begin
// If we're under "RequireDynamicMode", we have just ONE file in "SourceFiles" list,
@ -140,7 +140,7 @@ var
CurrentFileIndex: Integer;
iTotalDiskSize, iFreeDiskSize: Int64;
TargetFileStream: TFileStreamEx = nil;
DynamicNextFilename : UTF8String;
DynamicNextFilename : String;
UserAnswer: TFileSourceOperationUIResponse;
begin
try
@ -409,7 +409,7 @@ end;
function TFileSystemCombineOperation.TryToGetInfroFromTheCRC32VerificationFile:boolean;
var
PosOfEqualSign: integer;
MaybeSummaryFilename: UTF8String;
MaybeSummaryFilename: String;
hSummaryFile: THandle;
LineToParse: string;
UserAnswer: TFileSourceOperationUIResponse;
@ -471,7 +471,7 @@ begin
end;
{ TFileSystemCombineOperation.BegForPresenceOfThisFile }
procedure TFileSystemCombineOperation.BegForPresenceOfThisFile(aFilename: UTF8String);
procedure TFileSystemCombineOperation.BegForPresenceOfThisFile(aFilename: String);
begin
while not mbFileExists(aFilename) do
begin

View file

@ -30,7 +30,7 @@ type
constructor Create(aTargetFileSource: IFileSource;
var aExecutableFile: TFile;
aCurrentPath,
aVerb: UTF8String); override;
aVerb: String); override;
procedure Initialize; override;
procedure MainExecute; override;
@ -46,7 +46,7 @@ constructor TFileSystemExecuteOperation.Create(
aTargetFileSource: IFileSource;
var aExecutableFile: TFile;
aCurrentPath,
aVerb: UTF8String);
aVerb: String);
begin
FFileSystemFileSource := aTargetFileSource as IFileSystemFileSource;
inherited Create(aTargetFileSource, aExecutableFile, aCurrentPath, aVerb);

View file

@ -684,7 +684,7 @@ end;
function TFileSystemFileSource.IsPathAtRoot(Path: String): Boolean;
var
sPath: UTF8String;
sPath: String;
begin
sPath := ExcludeTrailingPathDelimiter(Path);
if (Pos('\\', sPath) = 1) and (NumCountChars(PathDelim, sPath) = 3) then

View file

@ -16,7 +16,7 @@ type
TFileSystemListOperation = class(TFileSourceListOperation)
private
procedure FlatView(const APath: UTF8String);
procedure FlatView(const APath: String);
public
constructor Create(aFileSource: IFileSource; aPath: String); override;
procedure MainExecute; override;
@ -27,7 +27,7 @@ implementation
uses
DCOSUtils, uFile, uFindEx, uOSUtils, uFileSystemFileSource;
procedure TFileSystemListOperation.FlatView(const APath: UTF8String);
procedure TFileSystemListOperation.FlatView(const APath: String);
var
AFile: TFile;
sr: TSearchRecEx;

View file

@ -23,7 +23,7 @@ type
// Options.
FSymLinkOption: TFileSourceOperationOptionSymLink;
function RenameFile(const OldName: UTF8String; NewName: UTF8String): TSetFilePropertyResult;
function RenameFile(const OldName: String; NewName: String): TSetFilePropertyResult;
protected
function SetNewProperty(aFile: TFile; aTemplateProperty: TFileProperty): TSetFilePropertyResult; override;
@ -246,7 +246,7 @@ begin
end;
end;
function TFileSystemSetFilePropertyOperation.RenameFile(const OldName: UTF8String; NewName: UTF8String): TSetFilePropertyResult;
function TFileSystemSetFilePropertyOperation.RenameFile(const OldName: String; NewName: String): TSetFilePropertyResult;
function AskIfOverwrite(Attrs: TFileAttrs): TFileSourceOperationUIResponse;
var
@ -287,7 +287,7 @@ function TFileSystemSetFilePropertyOperation.RenameFile(const OldName: UTF8Strin
var
{$IFDEF UNIX}
tmpFileName: UTF8String;
tmpFileName: String;
OldFileStat, NewFileStat: stat;
{$ELSE}
NewFileAttrs: TFileAttrs;

View file

@ -19,12 +19,12 @@ type
TFileSystemSplitOperation = class(TFileSourceSplitOperation)
private
FStatistics: TFileSourceSplitOperationStatistics; // local copy of statistics
FTargetpath: UTF8String;
FTargetpath: String;
FBuffer: Pointer;
FBufferSize: LongWord;
FCheckFreeSpace: Boolean;
protected
function Split(aSourceFileStream: TFileStreamEx; TargetFile: UTF8String): Boolean;
function Split(aSourceFileStream: TFileStreamEx; TargetFile: String): Boolean;
procedure ShowError(sMessage: String);
procedure LogMessage(sMessage: String; logOptions: TLogOptions; logMsgType: TLogMsgType);
@ -99,9 +99,9 @@ var
iExt, CurrentFileIndex: Integer;
iTotalDiskSize, iFreeDiskSize: Int64;
SourceFileStream: TFileStreamEx = nil;
TargetFilename: UTF8String;
TargetFilename: String;
hSummaryFile: THandle;
SummaryFilename:UTF8String;
SummaryFilename:String;
respAutomaticSwapDisk: TFileSourceOperationUIResponse;
begin
try
@ -230,7 +230,7 @@ procedure TFileSystemSplitOperation.Finalize;
begin
end;
function TFileSystemSplitOperation.Split(aSourceFileStream: TFileStreamEx; TargetFile: UTF8String): Boolean;
function TFileSystemSplitOperation.Split(aSourceFileStream: TFileStreamEx; TargetFile: String): Boolean;
var
TargetFileStream: TFileStreamEx = nil; // for safety exception handling
iTotalDiskSize, iFreeDiskSize: Int64;

View file

@ -20,8 +20,8 @@ uses
out NewFiles: TFiles;
out FilesCount: Int64;
out FilesSize: Int64);
function FileExistsMessage(const TargetName, SourceName: UTF8String;
SourceSize: Int64; SourceTime: TDateTime): UTF8String;
function FileExistsMessage(const TargetName, SourceName: String;
SourceSize: Int64; SourceTime: TDateTime): String;
type
@ -226,8 +226,8 @@ begin
end;
end;
function FileExistsMessage(const TargetName, SourceName: UTF8String;
SourceSize: Int64; SourceTime: TDateTime): UTF8String;
function FileExistsMessage(const TargetName, SourceName: String;
SourceSize: Int64; SourceTime: TDateTime): String;
var
TargetInfo: TSearchRec;
begin

View file

@ -173,7 +173,7 @@ procedure ask_password_cb (op: PGMountOperation;
var
UserName,
Password,
Domain: UTF8String;
Domain: String;
password_save: TGPasswordSave;
mount_handled: gboolean = FALSE;
FileSource: TGioFileSource absolute user_data;

View file

@ -119,7 +119,7 @@ var
I: Integer;
aFile: TFile;
procedure FillAndCountRec(const srcPath: UTF8String);
procedure FillAndCountRec(const srcPath: String);
var
AFolder: PGFile;
AError: PGError;
@ -186,7 +186,7 @@ begin
end;
end;
function FileExistsMessage(SourceFile: TFile; TargetInfo: PGFileInfo; const TargetName: UTF8String): UTF8String;
function FileExistsMessage(SourceFile: TFile; TargetInfo: PGFileInfo; const TargetName: String): String;
begin
Result:= rsMsgFileExistsOverwrite + LineEnding + TargetName + LineEnding +
Format(rsMsgFileExistsFileInfo, [Numb2USA(IntToStr(g_file_info_get_size(TargetInfo))),

View file

@ -101,7 +101,7 @@ procedure TMultiArchiveCalcStatisticsOperation.ProcessSubDirs(const srcPath: Str
var
I: Integer;
ArchiveItem: TArchiveItem;
CurrFileName: UTF8String;
CurrFileName: String;
ModificationTime: TDateTime;
begin
for I:= 0 to FMultiArchiveFileSource.ArchiveFileList.Count - 1 do

View file

@ -24,27 +24,27 @@ type
FFullFilesTree,
FRemoveFilesTree: TFiles;
FPackingFlags: Integer;
FPassword: UTF8String;
FVolumeSize: UTF8String;
FCustomParams: UTF8String;
FPassword: String;
FVolumeSize: String;
FCustomParams: String;
FCallResult,
FTarBefore: Boolean; // Create TAR archive first
FTarFileName: UTF8String; // Temporary TAR archive name
FTarFileName: String; // Temporary TAR archive name
procedure ShowError(sMessage: String; logOptions: TLogOptions = []);
procedure LogMessage(sMessage: String; logOptions: TLogOptions; logMsgType: TLogMsgType);
function CheckForErrors(const FileName: UTF8String; ExitStatus: LongInt): Boolean;
procedure DeleteFile(const BasePath: UTF8String; aFile: TFile);
procedure DeleteFiles(const BasePath: UTF8String; aFiles: TFiles);
function CheckForErrors(const FileName: String; ExitStatus: LongInt): Boolean;
procedure DeleteFile(const BasePath: String; aFile: TFile);
procedure DeleteFiles(const BasePath: String; aFiles: TFiles);
protected
FExProcess: TExProcess;
FTempFile: UTF8String;
FTempFile: String;
FErrorLevel: LongInt;
function Tar: Boolean;
procedure OnReadLn(str: string);
procedure OperationProgressHandler;
procedure UpdateProgress(SourceName, TargetName: UTF8String; IncSize: Int64);
procedure UpdateProgress(SourceName, TargetName: String; IncSize: Int64);
procedure FileSourceOperationStateChangedNotify(Operation: TFileSourceOperation;
AState: TFileSourceOperationState);
@ -61,9 +61,9 @@ type
procedure Finalize; override;
property PackingFlags: Integer read FPackingFlags write FPackingFlags;
property Password: UTF8String read FPassword write FPassword;
property VolumeSize: UTF8String read FVolumeSize write FVolumeSize;
property CustomParams: UTF8String read FCustomParams write FCustomParams;
property Password: String read FPassword write FPassword;
property VolumeSize: String read FVolumeSize write FVolumeSize;
property CustomParams: String read FCustomParams write FCustomParams;
property TarBefore: Boolean read FTarBefore write FTarBefore;
end;
@ -131,7 +131,7 @@ var
MultiArcItem: TMultiArcItem;
aFile: TFile;
sReadyCommand,
sCommandLine: UTF8String;
sCommandLine: String;
begin
// Put to TAR archive if needed
if FTarBefore then Tar;
@ -263,7 +263,7 @@ begin
end;
end;
function TMultiArchiveCopyInOperation.CheckForErrors(const FileName: UTF8String; ExitStatus: LongInt): Boolean;
function TMultiArchiveCopyInOperation.CheckForErrors(const FileName: String; ExitStatus: LongInt): Boolean;
begin
if ExitStatus > FErrorLevel then
begin
@ -281,7 +281,7 @@ begin
FCallResult:= Result;
end;
procedure TMultiArchiveCopyInOperation.DeleteFile(const BasePath: UTF8String; aFile: TFile);
procedure TMultiArchiveCopyInOperation.DeleteFile(const BasePath: String; aFile: TFile);
begin
if aFile.IsDirectory then
mbRemoveDir(BasePath + aFile.FullPath)
@ -289,7 +289,7 @@ begin
mbDeleteFile(BasePath + aFile.FullPath);
end;
procedure TMultiArchiveCopyInOperation.DeleteFiles(const BasePath: UTF8String; aFiles: TFiles);
procedure TMultiArchiveCopyInOperation.DeleteFiles(const BasePath: String; aFiles: TFiles);
var
I: Integer;
aFile: TFile;
@ -353,7 +353,7 @@ begin
end;
procedure TMultiArchiveCopyInOperation.UpdateProgress(SourceName,
TargetName: UTF8String; IncSize: Int64);
TargetName: String; IncSize: Int64);
begin
with FStatistics do
begin

View file

@ -26,7 +26,7 @@ type
FFullFilesTreeToExtract: TFiles; // source files including all files/dirs in subdirectories
// Options
FPassword: UTF8String;
FPassword: String;
FExtractWithoutPath: Boolean;
{en
@ -57,16 +57,16 @@ type
procedure ShowError(sMessage: String; logOptions: TLogOptions = []);
procedure LogMessage(sMessage: String; logOptions: TLogOptions; logMsgType: TLogMsgType);
procedure CheckForErrors(const SourceName, TargetName: UTF8String; ExitStatus: LongInt);
procedure CheckForErrors(const SourceName, TargetName: String; ExitStatus: LongInt);
protected
FExProcess: TExProcess;
FTempFile: UTF8String;
FFileMask: UTF8String;
FTempFile: String;
FFileMask: String;
FErrorLevel: LongInt;
procedure OnReadLn(str: string);
procedure OnQueryString(str: string);
procedure UpdateProgress(SourceName, TargetName: UTF8String; IncSize: Int64);
procedure UpdateProgress(SourceName, TargetName: String; IncSize: Int64);
procedure FileSourceOperationStateChangedNotify(Operation: TFileSourceOperation;
AState: TFileSourceOperationState);
@ -84,7 +84,7 @@ type
class function GetOptionsUIClass: TFileSourceOperationOptionsUIClass; override;
property Password: UTF8String read FPassword write FPassword;
property Password: String read FPassword write FPassword;
property ExtractWithoutPath: Boolean read FExtractWithoutPath write FExtractWithoutPath;
end;
@ -149,13 +149,13 @@ procedure TMultiArchiveCopyOutOperation.MainExecute;
var
TargetFileName,
SourcePath,
sTempDir: UTF8String;
sTempDir: String;
CreatedPaths: TStringHashList = nil;
I: Integer;
aFile: TFile;
MultiArcItem: TMultiArcItem;
sReadyCommand,
sCommandLine: UTF8String;
sCommandLine: String;
FilesToExtract: TFiles = nil;
begin
MultiArcItem := FMultiArchiveFileSource.MultiArcItem;
@ -574,7 +574,7 @@ begin
end;
procedure TMultiArchiveCopyOutOperation.CheckForErrors(const SourceName,
TargetName: UTF8String;
TargetName: String;
ExitStatus: LongInt);
begin
if ExitStatus > FErrorLevel then
@ -609,7 +609,7 @@ begin
end;
procedure TMultiArchiveCopyOutOperation.UpdateProgress(SourceName,
TargetName: UTF8String; IncSize: Int64);
TargetName: String; IncSize: Int64);
begin
with FStatistics do
begin

View file

@ -27,14 +27,14 @@ type
procedure ShowError(sMessage: String; logOptions: TLogOptions);
procedure LogMessage(sMessage: String; logOptions: TLogOptions; logMsgType: TLogMsgType);
procedure CheckForErrors(const FileName: UTF8String; ExitStatus: LongInt);
procedure CheckForErrors(const FileName: String; ExitStatus: LongInt);
protected
FExProcess: TExProcess;
FTempFile: UTF8String;
FTempFile: String;
FErrorLevel: LongInt;
procedure OnReadLn(str: string);
procedure UpdateProgress(SourceName: UTF8String; IncSize: Int64);
procedure UpdateProgress(SourceName: String; IncSize: Int64);
procedure FileSourceOperationStateChangedNotify(Operation: TFileSourceOperation;
AState: TFileSourceOperationState);
@ -96,7 +96,7 @@ var
MultiArcItem: TMultiArcItem;
aFile: TFile;
sReadyCommand,
sCommandLine: UTF8String;
sCommandLine: String;
begin
MultiArcItem := FMultiArchiveFileSource.MultiArcItem;
sCommandLine:= MultiArcItem.FDelete;
@ -193,7 +193,7 @@ begin
logWrite(Thread, str, lmtInfo, True, False);
end;
procedure TMultiArchiveDeleteOperation.CheckForErrors(const FileName: UTF8String; ExitStatus: LongInt);
procedure TMultiArchiveDeleteOperation.CheckForErrors(const FileName: String; ExitStatus: LongInt);
begin
if ExitStatus > FErrorLevel then
begin
@ -208,7 +208,7 @@ begin
end;
end;
procedure TMultiArchiveDeleteOperation.UpdateProgress(SourceName: UTF8String; IncSize: Int64);
procedure TMultiArchiveDeleteOperation.UpdateProgress(SourceName: String; IncSize: Int64);
begin
with FStatistics do
begin

View file

@ -30,7 +30,7 @@ type
constructor Create(aTargetFileSource: IFileSource;
var aExecutableFile: TFile;
aCurrentPath,
aVerb: UTF8String); override;
aVerb: String); override;
procedure Initialize; override;
procedure MainExecute; override;
@ -46,7 +46,7 @@ constructor TMultiArchiveExecuteOperation.Create(
aTargetFileSource: IFileSource;
var aExecutableFile: TFile;
aCurrentPath,
aVerb: UTF8String);
aVerb: String);
begin
FMultiArchiveFileSource := aTargetFileSource as IMultiArchiveFileSource;
inherited Create(aTargetFileSource, aExecutableFile, aCurrentPath, aVerb);

View file

@ -17,19 +17,19 @@ type
IMultiArchiveFileSource = interface(IArchiveFileSource)
['{71BF41D3-1E40-4E84-83BB-B6D3E0DEB6FC}']
function GetPassword: UTF8String;
function GetPassword: String;
function GetArcFileList: TObjectList;
function GetMultiArcItem: TMultiArcItem;
function FileIsLink(ArchiveItem: TArchiveItem): Boolean;
function FileIsDirectory(ArchiveItem: TArchiveItem): Boolean;
procedure FillAndCount(const FileMask: UTF8String; Files: TFiles;
procedure FillAndCount(const FileMask: String; Files: TFiles;
CountDirs: Boolean;
out NewFiles: TFiles;
out FilesCount: Int64; out FilesSize: Int64);
property Password: UTF8String read GetPassword;
property Password: String read GetPassword;
property ArchiveFileList: TObjectList read GetArcFileList;
property MultiArcItem: TMultiArcItem read GetMultiArcItem;
end;
@ -38,7 +38,7 @@ type
TMultiArchiveFileSource = class(TArchiveFileSource, IMultiArchiveFileSource)
private
FPassword: UTF8String;
FPassword: String;
FOutputParser: TOutputParser;
FArcFileList : TObjectList;
FMultiArcItem: TMultiArcItem;
@ -47,7 +47,7 @@ type
FLinkAttribute,
FDirectoryAttribute: TFileAttrs;
function GetPassword: UTF8String;
function GetPassword: String;
function GetMultiArcItem: TMultiArcItem;
procedure OnGetArchiveItem(ArchiveItem: TArchiveItem);
@ -66,7 +66,7 @@ type
procedure DoReload(const PathsToReload: TPathsArray); override;
public
procedure FillAndCount(const FileMask: UTF8String; Files: TFiles;
procedure FillAndCount(const FileMask: String; Files: TFiles;
CountDirs: Boolean;
out NewFiles: TFiles;
out FilesCount: Int64; out FilesSize: Int64);
@ -116,7 +116,7 @@ type
}
class function CheckAddonByExt(anArchiveType: String): Boolean;
property Password: UTF8String read GetPassword;
property Password: String read GetPassword;
property ArchiveFileList: TObjectList read GetArcFileList;
property MultiArcItem: TMultiArcItem read GetMultiArcItem;
end;
@ -478,7 +478,7 @@ begin
FArcFileList.Add(ArchiveItem);
end;
function TMultiArchiveFileSource.GetPassword: UTF8String;
function TMultiArchiveFileSource.GetPassword: String;
begin
Result:= FPassword;
end;
@ -555,13 +555,13 @@ begin
ReadArchive;
end;
procedure TMultiArchiveFileSource.FillAndCount(const FileMask: UTF8String; Files: TFiles;
procedure TMultiArchiveFileSource.FillAndCount(const FileMask: String; Files: TFiles;
CountDirs: Boolean; out NewFiles: TFiles; out FilesCount: Int64;
out FilesSize: Int64);
var
I, J: Integer;
ArchiveItem: TArchiveItem;
sFileName: UTF8String;
sFileName: String;
aFile: TFile;
begin
NewFiles:= TFiles.Create(Files.Path);

View file

@ -27,14 +27,14 @@ type
procedure ShowError(sMessage: String; logOptions: TLogOptions);
procedure LogMessage(sMessage: String; logOptions: TLogOptions; logMsgType: TLogMsgType);
procedure CheckForErrors(const FileName: UTF8String; ExitStatus: LongInt);
procedure CheckForErrors(const FileName: String; ExitStatus: LongInt);
protected
FExProcess: TExProcess;
FTempFile: UTF8String;
FTempFile: String;
FErrorLevel: LongInt;
procedure OnReadLn(str: string);
procedure UpdateProgress(SourceName: UTF8String; IncSize: Int64);
procedure UpdateProgress(SourceName: String; IncSize: Int64);
procedure FileSourceOperationStateChangedNotify(Operation: TFileSourceOperation;
AState: TFileSourceOperationState);
@ -97,7 +97,7 @@ var
MultiArcItem: TMultiArcItem;
aFile: TFile;
sReadyCommand,
sCommandLine: UTF8String;
sCommandLine: String;
begin
MultiArcItem := FMultiArchiveFileSource.MultiArcItem;
sCommandLine:= MultiArcItem.FTest;
@ -194,7 +194,7 @@ begin
logWrite(Thread, str, lmtInfo, True, False);
end;
procedure TMultiArchiveTestArchiveOperation.CheckForErrors(const FileName: UTF8String; ExitStatus: LongInt);
procedure TMultiArchiveTestArchiveOperation.CheckForErrors(const FileName: String; ExitStatus: LongInt);
begin
if ExitStatus > FErrorLevel then
begin
@ -209,7 +209,7 @@ begin
end;
end;
procedure TMultiArchiveTestArchiveOperation.UpdateProgress(SourceName: UTF8String; IncSize: Int64);
procedure TMultiArchiveTestArchiveOperation.UpdateProgress(SourceName: String; IncSize: Int64);
begin
with FStatistics do
begin

View file

@ -30,7 +30,7 @@ type
{ TOutputParser }
TOutputParser = class
FPassword: UTF8String;
FPassword: String;
FMultiArcItem: TMultiArcItem;
FExProcess: TExProcess;
private
@ -51,36 +51,36 @@ type
FStartParsing: boolean;
FFormatIndex: longint;
FArchiveItem: TArchiveItem;
FArchiveName: UTF8String;
FArchiveName: String;
FGetFileAttr: TGetFileAttr;
FGetFileName: TGetFileName;
protected
procedure SplitFileName;
function FixPosition(const Str: String; Key: TKeyPos): LongInt;
function KeyPos(Key: char; out Position: TKeyPos): boolean;
function GetKeyValue(const str: String; Key: TKeyPos): UTF8String;
function GetKeyValue(const str: String; Key: TKeyPos): String;
procedure OnReadLn(str: string);
procedure OnQueryString(str: string);
function CheckOut(const SubStr, Str: string): boolean;
public
constructor Create(aMultiArcItem: TMultiArcItem; const anArchiveName: UTF8String);
constructor Create(aMultiArcItem: TMultiArcItem; const anArchiveName: String);
destructor Destroy; override;
procedure Prepare;
procedure Execute;
property Password: UTF8String read FPassword write FPassword;
property Password: String read FPassword write FPassword;
property OnGetArchiveItem: TOnGetArchiveItem read FOnGetArchiveItem write FOnGetArchiveItem;
end;
function ExtractErrorLevel(var Command: UTF8String): LongInt;
function ExtractErrorLevel(var Command: String): LongInt;
function FormatArchiverCommand(const Archiver, sCmd, anArchiveName: UTF8String;
function FormatArchiverCommand(const Archiver, sCmd, anArchiveName: String;
aFiles: TFiles = nil;
sFileName: UTF8String = '';
aDestPath: UTF8String = '';
sTempFile: UTF8String = '';
sPassword: UTF8String = '';
sVolumeSize: UTF8String = '';
sCustomParams: UTF8String = ''): string;
sFileName: String = '';
aDestPath: String = '';
sTempFile: String = '';
sPassword: String = '';
sVolumeSize: String = '';
sCustomParams: String = ''): string;
implementation
@ -178,7 +178,7 @@ begin
end;
end;
function TOutputParser.GetKeyValue(const str: String; Key: TKeyPos): UTF8String;
function TOutputParser.GetKeyValue(const str: String; Key: TKeyPos): String;
begin
Result:= Copy(str, FixPosition(str, Key), Key.Count);
end;
@ -279,7 +279,7 @@ begin
end;
constructor TOutputParser.Create(aMultiArcItem: TMultiArcItem;
const anArchiveName: UTF8String);
const anArchiveName: String);
begin
FMultiArcItem := aMultiArcItem;
FArchiveName:= anArchiveName;
@ -331,7 +331,7 @@ end;
procedure TOutputParser.Prepare;
var
sCommandLine: UTF8String;
sCommandLine: String;
begin
FStartParsing:= False;
FFormatIndex:= 0;
@ -351,7 +351,7 @@ begin
end;
end;
function ExtractErrorLevel(var Command: UTF8String): LongInt;
function ExtractErrorLevel(var Command: String): LongInt;
var
I, J: Integer;
sErrorLevel: String;
@ -369,14 +369,14 @@ begin
end;
end;
function FormatArchiverCommand(const Archiver, sCmd, anArchiveName: UTF8String;
function FormatArchiverCommand(const Archiver, sCmd, anArchiveName: String;
aFiles: TFiles;
sFileName: UTF8String;
aDestPath: UTF8String;
sTempFile: UTF8String;
sPassword: UTF8String;
sVolumeSize: UTF8String;
sCustomParams: UTF8String): string;
sFileName: String;
aDestPath: String;
sTempFile: String;
sPassword: String;
sVolumeSize: String;
sCustomParams: String): string;
type
TFunctType = (ftNone, ftArchiverLongName, ftArchiverShortName,
ftArchiveLongName, ftArchiveShortName,
@ -401,7 +401,7 @@ var
sOutput: string = '';
parseStartIndex: integer;
function BuildName(const sFileName: UTF8String): UTF8String;
function BuildName(const sFileName: String): String;
begin
Result := sFileName;
if fmNameOnly in state.FuncModifiers then
@ -420,7 +420,7 @@ var
Result := UTF8ToConsole(Result);
end;
function BuildFileList(bShort: boolean): UTF8String;
function BuildFileList(bShort: boolean): String;
var
I: integer;
FileList: TStringListEx;
@ -445,7 +445,7 @@ var
FileList.Free;
end;
function BuildOutput: UTF8String;
function BuildOutput: String;
begin
case state.funct of
ftArchiverLongName:
@ -510,7 +510,7 @@ var
procedure DoFunction;
var
aOutput: UTF8String;
aOutput: String;
begin
aOutput:= BuildOutput;
if (aOutput = EmptyStr) and (state.bracketStartIndex <> 0) then

View file

@ -18,7 +18,7 @@ function GetArchiveFileSource(SourceFileSource: IFileSource;
procedure TestArchive(aFileView: TFileView; aFiles: TFiles);
function FileIsArchive(const FileName: UTF8String): Boolean;
function FileIsArchive(const FileName: String): Boolean;
implementation
@ -247,9 +247,9 @@ begin
end;
end;
function FileIsArchive(const FileName: UTF8String): Boolean;
function FileIsArchive(const FileName: String): Boolean;
var
ArchiveType: UTF8String;
ArchiveType: String;
begin
ArchiveType:= ExtractOnlyFileExt(FileName);
Result:= TWcxArchiveFileSource.CheckPluginByExt(ArchiveType) or

View file

@ -29,12 +29,12 @@ type
FFileSource: IFileSource;
FCurrentPath: String;
FExecutableFile: TFile;
FAbsolutePath: UTF8String;
FRelativePath: UTF8String;
FVerb: UTF8String;
FAbsolutePath: String;
FRelativePath: String;
FVerb: String;
protected
FResultString: UTF8String;
FResultString: String;
FExecuteOperationResult: TFileSourceExecuteOperationResult;
function GetID: TFileSourceOperationType; override;
procedure UpdateStatisticsAtStartTime; override;
@ -52,18 +52,18 @@ type
constructor Create(aTargetFileSource: IFileSource;
var aExecutableFile: TFile;
aCurrentPath,
aVerb: UTF8String); virtual reintroduce;
aVerb: String); virtual reintroduce;
destructor Destroy; override;
function GetDescription(Details: TFileSourceOperationDescriptionDetails): String; override;
property CurrentPath: UTF8String read FCurrentPath;
property CurrentPath: String read FCurrentPath;
property ExecutableFile: TFile read FExecutableFile;
property ResultString: UTF8String read FResultString write FResultString;
property AbsolutePath: UTF8String read FAbsolutePath;
property RelativePath: UTF8String read FRelativePath;
property Verb: UTF8String read FVerb;
property ResultString: String read FResultString write FResultString;
property AbsolutePath: String read FAbsolutePath;
property RelativePath: String read FRelativePath;
property Verb: String read FVerb;
property ExecuteOperationResult: TFileSourceExecuteOperationResult read FExecuteOperationResult;
end;
@ -76,7 +76,7 @@ constructor TFileSourceExecuteOperation.Create(
aTargetFileSource: IFileSource;
var aExecutableFile: TFile;
aCurrentPath,
aVerb: UTF8String);
aVerb: String);
begin
inherited Create(aTargetFileSource);

View file

@ -117,7 +117,7 @@ type
function RetrieveStatistics: TFileSourceSetFilePropertyOperationStatistics;
property TargetFiles: TFiles read FTargetFiles;
property NewProperties: TFileProperties read FNewProperties;
property NewProperties: TFileProperties read FNewProperties write FNewProperties;
property TemplateFiles: TFiles read FTemplateFiles; // set by SetTemplateFiles because can't use "var" in properties
property Recursive: Boolean read FRecursive write FRecursive;
property SupportedProperties: TFilePropertiesTypes read FSupportedProperties;

View file

@ -23,16 +23,16 @@ procedure ChooseFile(aFileView: TFileView; aFile: TFile);
}
function ChooseFileSource(aFileView: TFileView; aFile: TFile): Boolean; overload;
function ChooseFileSource(aFileView: TFileView; const aPath: UTF8String): Boolean; overload;
function ChooseFileSource(aFileView: TFileView; const aPath: String): Boolean; overload;
function ChooseArchive(aFileView: TFileView; aFile: TFile; bForce: Boolean = False): Boolean;
procedure ChooseSymbolicLink(aFileView: TFileView; aFile: TFile);
procedure SetFileSystemPath(aFileView: TFileView; aPath: UTF8String);
procedure SetFileSystemPath(aFileView: TFileView; aPath: String);
function RenameFile(aFileSource: IFileSource; const aFile: TFile;
const NewFileName: UTF8String; Interactive: Boolean): Boolean;
const NewFileName: String; Interactive: Boolean): Boolean;
function GetCopyOperationType(SourceFileSource, TargetFileSource: IFileSource;
out OperationType: TFileSourceOperationType): Boolean;
@ -176,10 +176,10 @@ begin
end;
end;
function ChooseFileSource(aFileView: TFileView; const aPath: UTF8String): Boolean;
function ChooseFileSource(aFileView: TFileView; const aPath: String): Boolean;
var
URI: TURI;
RemotePath: UTF8String;
RemotePath: String;
FileSource: IFileSource;
aFileSourceClass: TFileSourceClass;
begin
@ -255,7 +255,7 @@ end;
procedure ChooseSymbolicLink(aFileView: TFileView; aFile: TFile);
var
SearchRec: TSearchRecEx;
sPath: UTF8String;
sPath: String;
begin
if not aFileView.FileSource.IsClass(TFileSystemFileSource) then
begin
@ -283,7 +283,7 @@ begin
end;
end;
procedure SetFileSystemPath(aFileView: TFileView; aPath: UTF8String);
procedure SetFileSystemPath(aFileView: TFileView; aPath: String);
var
i: Integer;
begin
@ -312,7 +312,7 @@ begin
end;
function RenameFile(aFileSource: IFileSource; const aFile: TFile;
const NewFileName: UTF8String; Interactive: Boolean): Boolean;
const NewFileName: String; Interactive: Boolean): Boolean;
var
aFiles: TFiles = nil;
Operation: TFileSourceSetFilePropertyOperation = nil;

View file

@ -30,7 +30,7 @@ type
constructor Create(aTargetFileSource: IFileSource;
var aExecutableFile: TFile;
aCurrentPath,
aVerb: UTF8String); override;
aVerb: String); override;
procedure Initialize; override;
procedure MainExecute; override;
@ -46,7 +46,7 @@ constructor TVfsExecuteOperation.Create(
aTargetFileSource: IFileSource;
var aExecutableFile: TFile;
aCurrentPath,
aVerb: UTF8String);
aVerb: String);
begin
FVfsFileSource := aTargetFileSource as IVfsFileSource;
inherited Create(aTargetFileSource, aExecutableFile, aCurrentPath, aVerb);
@ -59,7 +59,7 @@ end;
procedure TVfsExecuteOperation.MainExecute;
var
sFileName: UTF8String;
sFileName: String;
WfxModule: TWfxModule = nil;
begin
FExecuteOperationResult:= fseorSuccess;

View file

@ -101,7 +101,7 @@ procedure TWcxArchiveCalcStatisticsOperation.ProcessSubDirs(const srcPath: Strin
var
I: Integer;
Header: TWCXHeader;
CurrFileName: UTF8String;
CurrFileName: String;
ModificationTime: TDateTime;
begin
for I:= 0 to FWcxArchiveFileSource.ArchiveFileList.Count - 1 do

View file

@ -28,7 +28,7 @@ type
FFullFilesTree: TFiles;
FPackingFlags: Integer; // Packing flags passed to plugin
FTarBefore: Boolean; // Create TAR archive first
FTarFileName: UTF8String; // Temporary TAR archive name
FTarFileName: String; // Temporary TAR archive name
FFileList: TStringHashList;
{en
@ -45,7 +45,7 @@ type
procedure SetChangeVolProc(hArcData: TArcHandle);
procedure SetProcessDataProc(hArcData: TArcHandle);
function FileExistsMessage(aSourceFile: TFile; aTargetHeader: TWcxHeader): UTF8String;
function FileExistsMessage(aSourceFile: TFile; aTargetHeader: TWcxHeader): String;
function FileExists(aSourceFile: TFile; aTargetHeader: TWcxHeader): TFileSourceOperationOptionFileExists;
public
@ -87,7 +87,7 @@ threadvar
// for plugins that supports background operations (see GetBackgroundFlags)
WcxCopyInOperationT: TWcxArchiveCopyInOperation;
function ChangeVolProc(var ArcName : UTF8String; Mode: LongInt): LongInt;
function ChangeVolProc(var ArcName : String; Mode: LongInt): LongInt;
begin
Result:= 1;
case Mode of
@ -105,7 +105,7 @@ end;
function ChangeVolProcA(ArcName : PAnsiChar; Mode: LongInt): LongInt; dcpcall;
var
sArcName: UTF8String;
sArcName: String;
begin
sArcName:= SysToUTF8(StrPas(ArcName));
Result:= ChangeVolProc(sArcName, Mode);
@ -115,7 +115,7 @@ end;
function ChangeVolProcW(ArcName : PWideChar; Mode: LongInt): LongInt; dcpcall;
var
sArcName: UTF8String;
sArcName: String;
begin
sArcName:= UTF8Encode(WideString(ArcName));
Result:= ChangeVolProc(sArcName, Mode);
@ -124,7 +124,7 @@ begin
end;
function ProcessDataProc(WcxCopyInOperation: TWcxArchiveCopyInOperation;
FileName: UTF8String; Size: LongInt): LongInt;
FileName: String; Size: LongInt): LongInt;
begin
//DCDebug('Working (' + IntToStr(GetCurrentThreadId) + ') ' + FileName + ' Size = ' + IntToStr(Size));
@ -278,7 +278,7 @@ begin
SetChangeVolProc(wcxInvalidHandle);
SetProcessDataProc(wcxInvalidHandle);
// Convert TFiles into UTF8String;
// Convert TFiles into String;
sFileList:= GetFileList(FFullFilesTree);
// Nothing to pack (user skip all files)
if sFileList = #0 then Exit;
@ -448,7 +448,7 @@ begin
end;
end;
function TWcxArchiveCopyInOperation.FileExistsMessage(aSourceFile: TFile; aTargetHeader: TWcxHeader): UTF8String;
function TWcxArchiveCopyInOperation.FileExistsMessage(aSourceFile: TFile; aTargetHeader: TWcxHeader): String;
begin
Result:= rsMsgFileExistsOverwrite + LineEnding + aTargetHeader.FileName + LineEnding;

View file

@ -108,7 +108,7 @@ threadvar
// for plugins that supports background operations (see GetBackgroundFlags)
WcxCopyOutOperationT: TWcxArchiveCopyOutOperation;
function ChangeVolProc(var ArcName : UTF8String; Mode: LongInt): LongInt;
function ChangeVolProc(var ArcName : String; Mode: LongInt): LongInt;
begin
Result:= 1;
case Mode of
@ -126,7 +126,7 @@ end;
function ChangeVolProcA(ArcName : PAnsiChar; Mode: LongInt): LongInt; dcpcall;
var
sArcName: UTF8String;
sArcName: String;
begin
sArcName:= SysToUTF8(StrPas(ArcName));
Result:= ChangeVolProc(sArcName, Mode);
@ -136,7 +136,7 @@ end;
function ChangeVolProcW(ArcName : PWideChar; Mode: LongInt): LongInt; dcpcall;
var
sArcName: UTF8String;
sArcName: String;
begin
sArcName:= UTF8Encode(WideString(ArcName));
Result:= ChangeVolProc(sArcName, Mode);
@ -145,7 +145,7 @@ begin
end;
function ProcessDataProc(WcxCopyOutOperation: TWcxArchiveCopyOutOperation;
FileName: UTF8String; Size: LongInt): LongInt;
FileName: String; Size: LongInt): LongInt;
begin
//DCDebug('Working (' + IntToStr(GetCurrentThreadId) + ') ' + FileName + ' Size = ' + IntToStr(Size));

View file

@ -62,7 +62,7 @@ var
// (There may be other running concurrently, but only one may report progress.)
WcxDeleteOperation: TWcxArchiveDeleteOperation = nil;
function ChangeVolProc(var ArcName : UTF8String; Mode: LongInt): LongInt;
function ChangeVolProc(var ArcName : String; Mode: LongInt): LongInt;
begin
Result:= 1;
case Mode of
@ -80,7 +80,7 @@ end;
function ChangeVolProcA(ArcName : PAnsiChar; Mode: LongInt): LongInt; dcpcall;
var
sArcName: UTF8String;
sArcName: String;
begin
sArcName:= SysToUTF8(StrPas(ArcName));
Result:= ChangeVolProc(sArcName, Mode);
@ -90,7 +90,7 @@ end;
function ChangeVolProcW(ArcName : PWideChar; Mode: LongInt): LongInt; dcpcall;
var
sArcName: UTF8String;
sArcName: String;
begin
sArcName:= UTF8Encode(WideString(ArcName));
Result:= ChangeVolProc(sArcName, Mode);
@ -98,7 +98,7 @@ begin
StrPLCopyW(ArcName, UTF8Decode(sArcName), MAX_PATH);
end;
function ProcessDataProc(FileName: UTF8String; Size: LongInt): LongInt;
function ProcessDataProc(FileName: String; Size: LongInt): LongInt;
begin
//DCDebug('Working ' + FileName + ' Size = ' + IntToStr(Size));

View file

@ -30,7 +30,7 @@ type
constructor Create(aTargetFileSource: IFileSource;
var aExecutableFile: TFile;
aCurrentPath,
aVerb: UTF8String); override;
aVerb: String); override;
procedure Initialize; override;
procedure MainExecute; override;
@ -46,7 +46,7 @@ constructor TWcxArchiveExecuteOperation.Create(
aTargetFileSource: IFileSource;
var aExecutableFile: TFile;
aCurrentPath,
aVerb: UTF8String);
aVerb: String);
begin
FWcxArchiveFileSource := aTargetFileSource as IWcxArchiveFileSource;
inherited Create(aTargetFileSource, aExecutableFile, aCurrentPath, aVerb);

View file

@ -166,7 +166,7 @@ var
WcxConnectionsLock: TCriticalSection; // used to synchronize access to connections
WcxOperationsQueueLock: TCriticalSection; // used to synchronize access to operations queue
function CryptProc(CryptoNumber: Integer; Mode: Integer; ArchiveName: UTF8String; var Password: UTF8String): Integer;
function CryptProc(CryptoNumber: Integer; Mode: Integer; ArchiveName: String; var Password: String): Integer;
const
cPrefix = 'wcx';
var
@ -219,7 +219,7 @@ end;
function CryptProcA(CryptoNumber: Integer; Mode: Integer; ArchiveName, Password: PAnsiChar; MaxLen: Integer): Integer; dcpcall;
var
sArchiveName,
sPassword: UTF8String;
sPassword: String;
begin
sArchiveName:= SysToUTF8(StrPas(ArchiveName));
sPassword:= SysToUTF8(StrPas(Password));
@ -234,7 +234,7 @@ end;
function CryptProcW(CryptoNumber: Integer; Mode: Integer; ArchiveName, Password: PWideChar; MaxLen: Integer): Integer; dcpcall;
var
sArchiveName,
sPassword: UTF8String;
sPassword: String;
begin
sArchiveName:= UTF8Encode(WideString(ArchiveName));
sPassword:= UTF8Encode(WideString(Password));

View file

@ -63,7 +63,7 @@ threadvar
// for plugins that supports background operations (see GetBackgroundFlags)
WcxTestArchiveOperationT: TWcxArchiveTestArchiveOperation;
function ChangeVolProc(var ArcName : UTF8String; Mode: LongInt): LongInt;
function ChangeVolProc(var ArcName : String; Mode: LongInt): LongInt;
begin
Result:= 1;
case Mode of
@ -81,7 +81,7 @@ end;
function ChangeVolProcA(ArcName : PAnsiChar; Mode: LongInt): LongInt; dcpcall;
var
sArcName: UTF8String;
sArcName: String;
begin
sArcName:= SysToUTF8(StrPas(ArcName));
Result:= ChangeVolProc(sArcName, Mode);
@ -91,7 +91,7 @@ end;
function ChangeVolProcW(ArcName : PWideChar; Mode: LongInt): LongInt; dcpcall;
var
sArcName: UTF8String;
sArcName: String;
begin
sArcName:= UTF8Encode(WideString(ArcName));
Result:= ChangeVolProc(sArcName, Mode);
@ -100,7 +100,7 @@ begin
end;
function ProcessDataProc(WcxTestArchiveOperation: TWcxArchiveTestArchiveOperation;
FileName: UTF8String; Size: LongInt): LongInt;
FileName: String; Size: LongInt): LongInt;
begin
//DCDebug('Working (' + IntToStr(GetCurrentThreadId) + ') ' + FileName + ' Size = ' + IntToStr(Size));

View file

@ -32,7 +32,7 @@ type
procedure SetNeedsConnection(AValue: Boolean);
protected
function UpdateProgress(SourceName, TargetName: UTF8String; PercentDone: Integer): Integer;
function UpdateProgress(SourceName, TargetName: String; PercentDone: Integer): Integer;
public
constructor Create(aSourceFileSource: IFileSource;
@ -70,7 +70,7 @@ begin
FInfoOperation:= FS_STATUS_OP_PUT_SINGLE;
end;
function TWfxPluginCopyInOperation.UpdateProgress(SourceName,TargetName: UTF8String;
function TWfxPluginCopyInOperation.UpdateProgress(SourceName,TargetName: String;
PercentDone: Integer): Integer;
var
iTemp: Int64;

View file

@ -30,7 +30,7 @@ type
// Options
FInfoOperation: LongInt;
protected
function UpdateProgress(SourceName, TargetName: UTF8String; PercentDone: Integer): Integer;
function UpdateProgress(SourceName, TargetName: String; PercentDone: Integer): Integer;
public
constructor Create(aSourceFileSource: IFileSource;
@ -55,7 +55,7 @@ uses
// -- TWfxPluginCopyOperation ---------------------------------------------
function TWfxPluginCopyOperation.UpdateProgress(SourceName, TargetName: UTF8String;
function TWfxPluginCopyOperation.UpdateProgress(SourceName, TargetName: String;
PercentDone: Integer): Integer;
var
iTemp: Int64;

View file

@ -32,7 +32,7 @@ type
procedure SetNeedsConnection(AValue: Boolean);
protected
function UpdateProgress(SourceName, TargetName: UTF8String; PercentDone: Integer): Integer;
function UpdateProgress(SourceName, TargetName: String; PercentDone: Integer): Integer;
public
constructor Create(aSourceFileSource: IFileSource;
@ -70,7 +70,7 @@ begin
FInfoOperation:= FS_STATUS_OP_GET_SINGLE;
end;
function TWfxPluginCopyOutOperation.UpdateProgress(SourceName, TargetName: UTF8String;
function TWfxPluginCopyOutOperation.UpdateProgress(SourceName, TargetName: String;
PercentDone: Integer): Integer;
var
iTemp: Int64;

View file

@ -30,7 +30,7 @@ type
constructor Create(aTargetFileSource: IFileSource;
var aExecutableFile: TFile;
aCurrentPath,
aVerb: UTF8String); override;
aVerb: String); override;
procedure Initialize; override;
procedure MainExecute; override;
@ -46,7 +46,7 @@ constructor TWfxPluginExecuteOperation.Create(
aTargetFileSource: IFileSource;
var aExecutableFile: TFile;
aCurrentPath,
aVerb: UTF8String);
aVerb: String);
begin
FWfxPluginFileSource := aTargetFileSource as IWfxPluginFileSource;
inherited Create(aTargetFileSource, aExecutableFile, aCurrentPath, aVerb);
@ -60,7 +60,7 @@ end;
procedure TWfxPluginExecuteOperation.MainExecute;
var
RemoteName: UTF8String;
RemoteName: String;
iResult: LongInt;
begin
RemoteName:= AbsolutePath;

View file

@ -12,7 +12,7 @@ uses
type
TUpdateProgress = function(SourceName, TargetName: UTF8String; PercentDone: Integer): Integer of object;
TUpdateProgress = function(SourceName, TargetName: String; PercentDone: Integer): Integer of object;
{ IWfxPluginFileSource }
@ -21,7 +21,7 @@ type
procedure FillAndCount(Files: TFiles; CountDirs: Boolean; ExcludeRootDir: Boolean;
out NewFiles: TFiles; out FilesCount: Int64; out FilesSize: Int64);
function WfxCopyMove(sSourceFile, sTargetFile: UTF8String; Flags: LongInt;
function WfxCopyMove(sSourceFile, sTargetFile: String; Flags: LongInt;
RemoteInfo: PRemoteInfo; Internal, CopyMoveIn: Boolean): LongInt;
function GetPluginNumber: LongInt;
@ -54,7 +54,7 @@ type
TWfxPluginFileSource = class(TFileSource, IWfxPluginFileSource)
private
FModuleFileName,
FPluginRootName: UTF8String;
FPluginRootName: String;
FWFXModule: TWFXModule;
FPluginNumber: LongInt;
FCallbackDataClass: TCallbackDataClass;
@ -84,11 +84,11 @@ type
public
procedure FillAndCount(Files: TFiles; CountDirs: Boolean; ExcludeRootDir: Boolean;
out NewFiles: TFiles; out FilesCount: Int64; out FilesSize: Int64);
function WfxCopyMove(sSourceFile, sTargetFile: UTF8String; Flags: LongInt;
function WfxCopyMove(sSourceFile, sTargetFile: String; Flags: LongInt;
RemoteInfo: PRemoteInfo; Internal, CopyMoveIn: Boolean): LongInt;
public
constructor Create(const URI: TURI); override;
constructor Create(aModuleFileName, aPluginRootName: UTF8String); reintroduce;
constructor Create(aModuleFileName, aPluginRootName: String); reintroduce;
destructor Destroy; override;
class function CreateFile(const APath: String): TFile; override;
@ -177,7 +177,7 @@ var
{ CallBack functions }
function MainProgressProc(PluginNr: Integer; SourceName, TargetName: UTF8String; PercentDone: Integer): Integer;
function MainProgressProc(PluginNr: Integer; SourceName, TargetName: String; PercentDone: Integer): Integer;
var
CallbackDataClass: TCallbackDataClass;
begin
@ -206,7 +206,7 @@ end;
function MainProgressProcA(PluginNr: Integer; SourceName, TargetName: PAnsiChar; PercentDone: Integer): Integer; dcpcall;
var
sSourceName,
sTargetName: UTF8String;
sTargetName: String;
begin
sSourceName:= SysToUTF8(StrPas(SourceName));
sTargetName:= SysToUTF8(StrPas(TargetName));
@ -216,14 +216,14 @@ end;
function MainProgressProcW(PluginNr: Integer; SourceName, TargetName: PWideChar; PercentDone: Integer): Integer; dcpcall;
var
sSourceName,
sTargetName: UTF8String;
sTargetName: String;
begin
sSourceName:= UTF8Encode(WideString(SourceName));
sTargetName:= UTF8Encode(WideString(TargetName));
Result:= MainProgressProc(PluginNr, sSourceName, sTargetName, PercentDone);
end;
procedure MainLogProc(PluginNr, MsgType: Integer; LogString: UTF8String);
procedure MainLogProc(PluginNr, MsgType: Integer; LogString: String);
var
I: Integer;
bLogFile: Boolean;
@ -292,9 +292,9 @@ begin
MainLogProc(PluginNr, MsgType, UTF8Encode(WideString(LogString)));
end;
function MainRequestProc(PluginNr, RequestType: Integer; CustomTitle, CustomText: UTF8String; var ReturnedText: UTF8String): Bool;
function MainRequestProc(PluginNr, RequestType: Integer; CustomTitle, CustomText: String; var ReturnedText: String): Bool;
var
sReq: UTF8String;
sReq: String;
begin
Result:= False;
// Use operation UI for this?
@ -366,7 +366,7 @@ function MainRequestProcA(PluginNr, RequestType: Integer; CustomTitle, CustomTex
var
sCustomTitle,
sCustomText,
sReturnedText: UTF8String;
sReturnedText: String;
begin
sCustomTitle:= SysToUTF8(StrPas(CustomTitle));
sCustomText:= SysToUTF8(StrPas(CustomText));
@ -383,7 +383,7 @@ function MainRequestProcW(PluginNr, RequestType: Integer; CustomTitle, CustomTex
var
sCustomTitle,
sCustomText,
sReturnedText: UTF8String;
sReturnedText: String;
begin
sCustomTitle:= UTF8Encode(WideString(CustomTitle));
sCustomText:= UTF8Encode(WideString(CustomText));
@ -396,7 +396,7 @@ begin
end;
end;
function CryptProc(PluginNr, CryptoNumber: Integer; Mode: Integer; ConnectionName: UTF8String; var Password: UTF8String): Integer;
function CryptProc(PluginNr, CryptoNumber: Integer; Mode: Integer; ConnectionName: String; var Password: String): Integer;
const
cPrefix = 'wfx';
var
@ -449,7 +449,7 @@ end;
function CryptProcA(PluginNr, CryptoNumber: Integer; Mode: Integer; ConnectionName, Password: PAnsiChar; MaxLen: Integer): Integer; dcpcall;
var
sConnectionName,
sPassword: UTF8String;
sPassword: String;
begin
sConnectionName:= SysToUTF8(StrPas(ConnectionName));
sPassword:= SysToUTF8(StrPas(Password));
@ -464,7 +464,7 @@ end;
function CryptProcW(PluginNr, CryptoNumber: Integer; Mode: Integer; ConnectionName, Password: PWideChar; MaxLen: Integer): Integer; dcpcall;
var
sConnectionName,
sPassword: UTF8String;
sPassword: String;
begin
sConnectionName:= UTF8Encode(WideString(ConnectionName));
sPassword:= UTF8Encode(WideString(Password));
@ -478,7 +478,7 @@ end;
{ TWfxPluginFileSource }
constructor TWfxPluginFileSource.Create(aModuleFileName, aPluginRootName: UTF8String);
constructor TWfxPluginFileSource.Create(aModuleFileName, aPluginRootName: String);
begin
inherited Create;
FPluginNumber:= -1;
@ -636,7 +636,7 @@ end;
procedure TWfxPluginFileSource.FillAndCount(Files: TFiles; CountDirs: Boolean;
ExcludeRootDir: Boolean; out NewFiles: TFiles; out FilesCount: Int64; out FilesSize: Int64);
procedure FillAndCountRec(const srcPath: UTF8String);
procedure FillAndCountRec(const srcPath: String);
var
FindData: TWfxFindData;
Handle: THandle;
@ -707,7 +707,7 @@ begin
end;
end;
function TWfxPluginFileSource.WfxCopyMove(sSourceFile, sTargetFile: UTF8String;
function TWfxPluginFileSource.WfxCopyMove(sSourceFile, sTargetFile: String;
Flags: LongInt; RemoteInfo: PRemoteInfo;
Internal, CopyMoveIn: Boolean): LongInt;
var
@ -734,7 +734,7 @@ end;
constructor TWfxPluginFileSource.Create(const URI: TURI);
var
sModuleFileName: UTF8String;
sModuleFileName: String;
begin
if gWFXPlugins.Count = 0 then Exit;
// Check if there is a registered plugin for the name of the file system plugin.
@ -839,7 +839,7 @@ end;
function TWfxPluginFileSource.GetLocalName(var aFile: TFile): Boolean;
var
sFileName: UTF8String;
sFileName: String;
begin
Result:= False;
sFileName:= aFile.FullPath;
@ -871,7 +871,7 @@ end;
class function TWfxPluginFileSource.CreateByRootName(aRootName: String): IWfxPluginFileSource;
var
sModuleFileName: UTF8String;
sModuleFileName: String;
begin
Result:= nil;

View file

@ -18,9 +18,9 @@ type
private
FWfxPluginFileSource: IWfxPluginFileSource;
FCallbackDataClass: TCallbackDataClass;
FCurrentPath: UTF8String;
FCurrentPath: String;
protected
function UpdateProgress(SourceName, TargetName: UTF8String; PercentDone: Integer): Integer;
function UpdateProgress(SourceName, TargetName: String; PercentDone: Integer): Integer;
public
constructor Create(aFileSource: IFileSource; aPath: String); override;
destructor Destroy; override;
@ -35,7 +35,7 @@ implementation
uses
uOSUtils, DCStrUtils, uFile, WfxPlugin, uWfxModule, uLog, uLng;
function TWfxPluginListOperation.UpdateProgress(SourceName, TargetName: UTF8String;
function TWfxPluginListOperation.UpdateProgress(SourceName, TargetName: String;
PercentDone: Integer): Integer;
begin
logWrite(rsMsgLoadingFileList + IntToStr(PercentDone) + '%', lmtInfo, False, False);

View file

@ -30,7 +30,7 @@ type
// Options
FInfoOperation: LongInt;
protected
function UpdateProgress(SourceName, TargetName: UTF8String; PercentDone: Integer): Integer;
function UpdateProgress(SourceName, TargetName: String; PercentDone: Integer): Integer;
public
constructor Create(aFileSource: IFileSource;
@ -54,7 +54,7 @@ uses
// -- TWfxPluginMoveOperation ---------------------------------------------
function TWfxPluginMoveOperation.UpdateProgress(SourceName, TargetName: UTF8String;
function TWfxPluginMoveOperation.UpdateProgress(SourceName, TargetName: String;
PercentDone: Integer): Integer;
var
iTemp: Int64;

View file

@ -138,7 +138,7 @@ end;
function TWfxPluginSetFilePropertyOperation.SetNewProperty(aFile: TFile;
aTemplateProperty: TFileProperty): TSetFilePropertyResult;
var
FileName: UTF8String;
FileName: String;
NewAttributes: TFileAttrs;
ftTime: TFileTime;
begin

View file

@ -73,7 +73,7 @@ type
property RenameMask: String read FRenameMask write FRenameMask;
end;
function WfxRenameFile(aFileSource: IWfxPluginFileSource; const aFile: TFile; const NewFileName: UTF8String): Boolean;
function WfxRenameFile(aFileSource: IWfxPluginFileSource; const aFile: TFile; const NewFileName: String): Boolean;
function WfxFileTimeToDateTime(FileTime : TWfxFileTime) : TDateTime; inline;
function DateTimeToWfxFileTime(DateTime : TDateTime) : TWfxFileTime; inline;
@ -84,7 +84,7 @@ uses
uFileProcs, DCStrUtils, uLng, uWfxModule, uFileSystemUtil, uFileProperty,
DCDateTimeUtils, DCBasicTypes;
function WfxRenameFile(aFileSource: IWfxPluginFileSource; const aFile: TFile; const NewFileName: UTF8String): Boolean;
function WfxRenameFile(aFileSource: IWfxPluginFileSource; const aFile: TFile; const NewFileName: String): Boolean;
var
RemoteInfo: TRemoteInfo;
iTemp: TInt64Rec;
@ -330,7 +330,7 @@ procedure TWfxPluginOperationHelper.ProcessFiles(aFiles: TFiles; var Statistics:
var
I: Integer;
iResult: LongInt;
sTargetFile : UTF8String;
sTargetFile : String;
aFile: TFile;
begin
FRenamingFiles := (FRenameMask <> '*.*') and (FRenameMask <> '');

View file

@ -30,7 +30,7 @@ type
constructor Create(aTargetFileSource: IFileSource;
var aExecutableFile: TFile;
aCurrentPath,
aVerb: UTF8String); override;
aVerb: String); override;
procedure MainExecute; override;
end;
@ -41,7 +41,7 @@ uses
Windows, JwaWinNetWk, DCStrUtils, DCOSUtils;
constructor TWinNetExecuteOperation.Create(aTargetFileSource: IFileSource;
var aExecutableFile: TFile; aCurrentPath, aVerb: UTF8String);
var aExecutableFile: TFile; aCurrentPath, aVerb: String);
begin
FWinNetFileSource := aTargetFileSource as IWinNetFileSource;
inherited Create(aTargetFileSource, aExecutableFile, aCurrentPath, aVerb);

View file

@ -27,7 +27,7 @@ type
private
FProviderName: array[0..MAX_PATH-1] of WideChar;
function GetProviderName: WideString;
function IsNetworkPath(const Path: UTF8String): Boolean;
function IsNetworkPath(const Path: String): Boolean;
protected
function SetCurrentWorkingDirectory(NewDir: String): Boolean; override;
@ -152,7 +152,7 @@ begin
Result:= WideString(FProviderName);
end;
function TWinNetFileSource.IsNetworkPath(const Path: UTF8String): Boolean;
function TWinNetFileSource.IsNetworkPath(const Path: String): Boolean;
begin
Result:= (NumCountChars(PathDelim, ExcludeTrailingPathDelimiter(Path)) < 3);
end;

View file

@ -44,7 +44,7 @@ var
dwCount, dwBufferSize: DWORD;
hEnum: THandle = INVALID_HANDLE_VALUE;
lpBuffer: Pointer = nil;
FilePath: UTF8String;
FilePath: String;
FileName: WideString;
begin
with FWinNetFileSource do

View file

@ -1091,7 +1091,7 @@ var
procedure AddFile;
var
J: Integer;
S: UTF8String;
S: String;
begin
if AFile.FSFile.IsNameValid then
begin

View file

@ -144,7 +144,7 @@ type
function GetFileSource(Index: Integer): IFileSource;
function GetFileSourcesCount: Integer;
function GetFiltered: Boolean;
function GetPath(FileSourceIndex, PathIndex: Integer): UTF8String;
function GetPath(FileSourceIndex, PathIndex: Integer): String;
function GetPathsCount(FileSourceIndex: Integer): Integer;
function GetSortingProperties: TFilePropertiesTypes;
function GetSortingForSorter: TFileSortings;
@ -491,7 +491,7 @@ type
property FileSourcesCount: Integer read GetFileSourcesCount;
property Flags: TFileViewFlags read FFlags write SetFlags;
property FlatView: Boolean read FFlatView write FFlatView;
property Path[FileSourceIndex, PathIndex: Integer]: UTF8String read GetPath;
property Path[FileSourceIndex, PathIndex: Integer]: String read GetPath;
property PathsCount[FileSourceIndex: Integer]: Integer read GetPathsCount;
property Sorting: TFileSortings read FSortings write SetSorting;
@ -2844,7 +2844,7 @@ begin
Result := Self.FileFilter <> EmptyStr;
end;
function TFileView.GetPath(FileSourceIndex, PathIndex: Integer): UTF8String;
function TFileView.GetPath(FileSourceIndex, PathIndex: Integer): String;
begin
with FHistory do
begin

View file

@ -88,7 +88,7 @@ end;
procedure TFileViewHeader.PathEditKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var
NewPath: UTF8String;
NewPath: String;
begin
case Key of
VK_ESCAPE:
@ -126,7 +126,7 @@ end;
procedure TFileViewHeader.PathLabelClick(Sender: TObject);
var
walkPath, dirNameToSelect: UTF8String;
walkPath, dirNameToSelect: String;
begin
FFileView.SetFocus;
@ -183,7 +183,7 @@ end;
procedure TFileViewHeader.AddressLabelClick(Sender: TObject);
var
walkPath, dirNameToSelect: UTF8String;
walkPath, dirNameToSelect: String;
begin
FFileView.SetFocus;

View file

@ -46,11 +46,11 @@ type
procedure DeleteAfterCurrent;
function GetCount: Integer; // = FileSourcesCount
function GetCurrentFileSource: IFileSource;
function GetCurrentPath: UTF8String;
function GetCurrentFilename: UTF8String;
function GetCurrentPath: String;
function GetCurrentFilename: String;
function GetFileSource(Index: Integer): IFileSource;
function GetPath(FileSourceIndex, PathIndex: Integer): UTF8String;
function GetFilename(FileSourceIndex, FilenameIndex: Integer): UTF8String;
function GetPath(FileSourceIndex, PathIndex: Integer): String;
function GetFilename(FileSourceIndex, FilenameIndex: Integer): String;
function GetPathsCount(Index: Integer): Integer;
public
@ -60,10 +60,10 @@ type
{$IFDEF DEBUG_HISTORY}
procedure DebugShow;
{$ENDIF}
procedure Add(aFileSource: IFileSource; aPath: UTF8String);
procedure Add(aFileSource: IFileSource; aPath: String);
procedure AddFileSource(aFileSource: IFileSource);
procedure AddPath(aPath: UTF8String);
procedure SetFilenameForCurrentPath(aFilename: UTF8String);
procedure AddPath(aPath: String);
procedure SetFilenameForCurrentPath(aFilename: String);
procedure Assign(otherHistory: TFileViewHistory);
procedure DeleteFromCurrentFileSource;
procedure SetIndexes(aFileSourceIndex: Integer; aCurrentPathIndex: Integer);
@ -71,12 +71,12 @@ type
property Count: Integer read GetCount;
property CurrentFileSource: IFileSource read GetCurrentFileSource;
property CurrentFileSourceIndex: Integer read FCurrentFileSource write FCurrentFileSource;
property CurrentPath: UTF8String read GetCurrentPath;
property CurrentFilename: UTF8String read GetCurrentFilename;
property CurrentPath: String read GetCurrentPath;
property CurrentFilename: String read GetCurrentFilename;
property CurrentPathIndex: Integer read FCurrentPath write FCurrentPath;
property FileSource[Index: Integer]: IFileSource read GetFileSource;
property Path[FileSourceIndex, PathIndex: Integer]: UTF8String read GetPath;
property Filename[FileSourceIndex, FilenameIndex: Integer]: UTF8String read GetFilename;
property Path[FileSourceIndex, PathIndex: Integer]: String read GetPath;
property Filename[FileSourceIndex, FilenameIndex: Integer]: String read GetFilename;
property PathsCount[Index: Integer]: Integer read GetPathsCount;
end;
@ -156,7 +156,7 @@ begin
Result := nil;
end;
function TFileViewHistory.GetCurrentPath: UTF8String;
function TFileViewHistory.GetCurrentPath: String;
begin
if (FCurrentFileSource >= 0) and (FCurrentPath >= 0) then
Result := PFileViewHistoryEntry(FHistory[FCurrentFileSource])^.PathsList[FCurrentPath]
@ -164,7 +164,7 @@ begin
Result := EmptyStr;
end;
function TFileViewHistory.GetCurrentFilename: UTF8String;
function TFileViewHistory.GetCurrentFilename: String;
begin
if (FCurrentFileSource >= 0) and (FCurrentPath >= 0) then
Result := PFileViewHistoryEntry(FHistory[FCurrentFileSource])^.FilenamesList[FCurrentPath]
@ -177,12 +177,12 @@ begin
Result := PFileViewHistoryEntry(FHistory.Items[Index])^.FileSource;
end;
function TFileViewHistory.GetPath(FileSourceIndex, PathIndex: Integer): UTF8String;
function TFileViewHistory.GetPath(FileSourceIndex, PathIndex: Integer): String;
begin
Result := PFileViewHistoryEntry(FHistory.Items[FileSourceIndex])^.PathsList.Strings[PathIndex];
end;
function TFileViewHistory.GetFilename(FileSourceIndex, FilenameIndex: Integer): UTF8String;
function TFileViewHistory.GetFilename(FileSourceIndex, FilenameIndex: Integer): String;
begin
Result := PFileViewHistoryEntry(FHistory.Items[FileSourceIndex])^.FilenamesList.Strings[FilenameIndex];
end;
@ -192,7 +192,7 @@ begin
Result := PFileViewHistoryEntry(FHistory.Items[Index])^.PathsList.Count;
end;
procedure TFileViewHistory.Add(aFileSource: IFileSource; aPath: UTF8String);
procedure TFileViewHistory.Add(aFileSource: IFileSource; aPath: String);
begin
AddFileSource(aFileSource);
AddPath(aPath);
@ -222,7 +222,7 @@ begin
FCurrentPath := -1;
end;
procedure TFileViewHistory.SetFilenameForCurrentPath(aFilename: UTF8String);
procedure TFileViewHistory.SetFilenameForCurrentPath(aFilename: String);
var
aFilenames: TStringList;
begin
@ -234,7 +234,7 @@ begin
end
end;
procedure TFileViewHistory.AddPath(aPath: UTF8String);
procedure TFileViewHistory.AddPath(aPath: String);
var
aPaths: TStringList;
aFilenames: TStringList;

View file

@ -97,7 +97,7 @@ type
procedure LoadConfiguration(AConfig: TXmlConfig; ANode: TXmlNode); override;
end;
function FitFileName(const AFileName: UTF8String; ACanvas: TCanvas; AFile: TFile; ATargetWidth: Integer): UTF8String;
function FitFileName(const AFileName: String; ACanvas: TCanvas; AFile: TFile; ATargetWidth: Integer): String;
implementation
@ -107,7 +107,7 @@ uses
uDCUtils, fMain,
uFileFunctions;
function FitFileName(const AFileName: UTF8String; ACanvas: TCanvas; AFile: TFile; ATargetWidth: Integer): UTF8String;
function FitFileName(const AFileName: String; ACanvas: TCanvas; AFile: TFile; ATargetWidth: Integer): String;
var
Index: Integer;
begin
@ -652,7 +652,7 @@ end;
procedure TFileViewWithGrid.UpdateFooterDetails;
var
AFile: TFile;
AFileName: UTF8String;
AFileName: String;
begin
if (FSelectedCount > 0) then
lblDetails.Caption:= EmptyStr
@ -820,7 +820,7 @@ end;
procedure TFileViewWithGrid.UpdateFlatFileName;
var
AFile: TFile;
AFileName: UTF8String;
AFileName: String;
begin
AFile:= CloneActiveFile;
if Assigned(AFile) then

View file

@ -856,7 +856,7 @@ end;
procedure TFileViewWithMainCtrl.MainControlShowHint(Sender: TObject; HintInfo: PHintInfo);
var
AFile: TDisplayFile;
sHint: UTF8String;
sHint: String;
begin
// Rewrite HintStr because when MainControl.Hint is empty
// it would contain parent hint that is not correct behavior

View file

@ -45,8 +45,8 @@ type
pmOperationsCancel: TPopupMenu;
procedure lblFilterClick(Sender: TObject);
procedure pmOperationsCancelClick(Sender: TObject);
procedure quickSearchChangeSearch(Sender: TObject; ASearchText: UTF8String; const ASearchOptions: TQuickSearchOptions);
procedure quickSearchChangeFilter(Sender: TObject; AFilterText: UTF8String; const AFilterOptions: TQuickSearchOptions);
procedure quickSearchChangeSearch(Sender: TObject; ASearchText: String; const ASearchOptions: TQuickSearchOptions);
procedure quickSearchChangeFilter(Sender: TObject; AFilterText: String; const AFilterOptions: TQuickSearchOptions);
procedure quickSearchExecute(Sender: TObject);
procedure quickSearchHide(Sender: TObject);
procedure UpdateRangeSelectionState;
@ -84,7 +84,7 @@ type
Search and position in a file that matches name taking into account
passed options.
}
procedure SearchFile(SearchTerm: UTF8String; SearchOptions: TQuickSearchOptions);
procedure SearchFile(SearchTerm: String; SearchOptions: TQuickSearchOptions);
procedure Selection(Key: Word; CurIndex: PtrInt);
procedure SelectRange(FileIndex: PtrInt);
procedure SetActiveFile(FileIndex: PtrInt); overload; virtual; abstract;
@ -452,7 +452,7 @@ begin
end;
end;
procedure TOrderedFileView.quickSearchChangeFilter(Sender: TObject; AFilterText: UTF8String; const AFilterOptions: TQuickSearchOptions);
procedure TOrderedFileView.quickSearchChangeFilter(Sender: TObject; AFilterText: String; const AFilterOptions: TQuickSearchOptions);
begin
Active := True;
@ -466,7 +466,7 @@ begin
lblFilter.Visible := Filtered;
end;
procedure TOrderedFileView.quickSearchChangeSearch(Sender: TObject; ASearchText: UTF8String; const ASearchOptions: TQuickSearchOptions);
procedure TOrderedFileView.quickSearchChangeSearch(Sender: TObject; ASearchText: String; const ASearchOptions: TQuickSearchOptions);
var
Index, MaybeFoundIndex: PtrInt;
begin
@ -499,17 +499,17 @@ begin
SetFocus;
end;
procedure TOrderedFileView.SearchFile(SearchTerm: UTF8String; SearchOptions: TQuickSearchOptions);
procedure TOrderedFileView.SearchFile(SearchTerm: String; SearchOptions: TQuickSearchOptions);
var
StartIndex, Index: PtrInt;
Result: Boolean;
sFileName,
sSearchName,
sSearchNameNoExt,
sSearchExt : UTF8String;
sSearchExt : String;
AFile: TFile;
uFileName: UnicodeString;
sPy: UTF8String;
sPy: String;
Mask: TMask;
function NextIndexWrap(Index: PtrInt): PtrInt;

View file

@ -48,11 +48,11 @@ type
{ ShowLinkerFilesForm:
"TMainCommands.cm_FileLinker" function from "uMainCommands.pas" is calling this routine.}
function ShowLinkerFilesForm(aFileSource: IFileSource; aFiles: TFiles; TargetPath: UTF8String): Boolean;
function ShowLinkerFilesForm(aFileSource: IFileSource; aFiles: TFiles; TargetPath: String): Boolean;
{ DoDynamicFilesLinking:
"TMainCommands.cm_FileLinker" function from "uMainCommands.pas" is calling this routine.}
procedure DoDynamicFilesLinking(aFileSource: IFileSource; aFiles: TFiles; TargetPath, aFirstFilenameOfSeries: UTF8String);
procedure DoDynamicFilesLinking(aFileSource: IFileSource; aFiles: TFiles; TargetPath, aFirstFilenameOfSeries: String);
implementation
@ -66,7 +66,7 @@ uses
{ ShowLinkerFilesForm:
"TMainCommands.cm_FileLinker" function from "uMainCommands.pas" is calling this routine.}
function ShowLinkerFilesForm(aFileSource: IFileSource; aFiles: TFiles; TargetPath: UTF8String): Boolean;
function ShowLinkerFilesForm(aFileSource: IFileSource; aFiles: TFiles; TargetPath: String): Boolean;
var
I: Integer;
xFiles: TFiles = nil;
@ -115,7 +115,7 @@ end;
{ DoDynamicFilesLinking:
"TMainCommands.cm_FileLinker" function from "uMainCommands.pas" is calling this routine.}
procedure DoDynamicFilesLinking(aFileSource: IFileSource; aFiles: TFiles; TargetPath, aFirstFilenameOfSeries: UTF8String);
procedure DoDynamicFilesLinking(aFileSource: IFileSource; aFiles: TFiles; TargetPath, aFirstFilenameOfSeries: String);
var
xFiles: TFiles = nil;
Operation: TFileSourceCombineOperation = nil;

View file

@ -611,7 +611,7 @@ type
procedure DriveListDriveSelected(Sender: TObject; ADriveIndex: Integer;
APanel: TFilePanelSelect);
procedure DriveListClose(Sender: TObject);
function FindMatchingDrive(Path: UTF8String): Integer;
function FindMatchingDrive(Path: String): Integer;
procedure UpdateDriveToolbarSelection(DriveToolbar: TKAStoolBar; FileView: TFileView);
procedure UpdateDriveButtonSelection(DriveButton: TSpeedButton; FileView: TFileView);
procedure UpdateSelectedDrive(ANoteBook: TFileViewNotebook);
@ -3296,7 +3296,7 @@ procedure TfrmMain.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var
ShiftEx : TShiftState;
CmdText : UTF8String;
CmdText : String;
begin
SetDragCursor(Shift);
@ -4810,7 +4810,7 @@ end;
procedure TfrmMain.LoadTabsCommandLine(Params: TCommandLineParams);
procedure AddTab(ANoteBook: TFileViewNotebook; aPath: UTF8String);
procedure AddTab(ANoteBook: TFileViewNotebook; aPath: String);
var
Page: TFileViewPage;
AFileView: TFileView;
@ -4828,7 +4828,7 @@ procedure TfrmMain.LoadTabsCommandLine(Params: TCommandLineParams);
ANoteBook.PageIndex := ANoteBook.PageCount - 1;
end;
procedure LoadPanel(aNoteBook: TFileViewNotebook; aPath: UTF8String);
procedure LoadPanel(aNoteBook: TFileViewNotebook; aPath: String);
begin
if Length(aPath) <> 0 then
begin
@ -4962,11 +4962,11 @@ begin
Result := (edtCommand.Visible and pnlCommand.Visible);
end;
function TfrmMain.FindMatchingDrive(Path: UTF8String): Integer;
function TfrmMain.FindMatchingDrive(Path: String): Integer;
var
i : Integer;
LongestPathLen: Integer = 0;
DrivePath: UTF8String;
DrivePath: String;
DrivePathLen: PtrInt;
begin
Result := -1;
@ -5240,7 +5240,7 @@ procedure TfrmMain.UpdatePrompt;
const
PTLen = 40;
var
st: UTF8String;
st: String;
begin
if (fsoExecute in ActiveFrame.FileSource.GetOperationsTypes) then
begin

View file

@ -51,7 +51,7 @@ type
{ public declarations }
end;
function ShowMaskInputDlg(const sCaption, sPrompt: UTF8String; slValueList: TStringList; var sValue: UTF8String): Boolean;
function ShowMaskInputDlg(const sCaption, sPrompt: String; slValueList: TStringList; var sValue: String): Boolean;
implementation
@ -60,8 +60,8 @@ implementation
uses
fFindDlg, uGlobs, uSearchTemplate;
function ShowMaskInputDlg(const sCaption, sPrompt: UTF8String;
slValueList: TStringList; var sValue: UTF8String): Boolean;
function ShowMaskInputDlg(const sCaption, sPrompt: String;
slValueList: TStringList; var sValue: String): Boolean;
var
Index: Integer;
begin
@ -117,7 +117,7 @@ end;
procedure TfrmMaskInputDlg.btnDefineTemplateClick(Sender: TObject);
var
sTemplateName: UTF8String;
sTemplateName: String;
begin
if lbxSearchTemplate.ItemIndex >= 0 then
sTemplateName:= lbxSearchTemplate.Items[lbxSearchTemplate.ItemIndex];

View file

@ -180,7 +180,7 @@ type
procedure InsertMask(const Mask:string;edChoose:Tedit);
procedure InsertMask(const Mask:string;editNr:PtrInt);
{Get new file name for file with ItemIndex}
function FreshText(ItemIndex: Integer): UTF8String;
function FreshText(ItemIndex: Integer): String;
{Executes the main operation of renaming files}
procedure RenameFiles;
{Changes first char to uppercase and the rest to lowercase}
@ -396,10 +396,10 @@ begin
InsertMask('[Y]',ppNameMenu.Tag);
end;
function TfrmMultiRename.FreshText(ItemIndex: Integer): UTF8String;
function TfrmMultiRename.FreshText(ItemIndex: Integer): String;
var
bError: Boolean;
sTmpName, sTmpExt: UTF8String;
sTmpName, sTmpExt: String;
begin
bError:= False;
@ -874,7 +874,7 @@ var
hFile: THandle;
c: Integer;
sNewName,
sResult: UTF8String;
sResult: String;
begin
try
if cbLog.Checked then

View file

@ -65,7 +65,7 @@ type
procedure tvApplicationsDeletion(Sender: TObject; Node: TTreeNode);
procedure tvApplicationsSelectionChanged(Sender: TObject);
private
FMimeType: UTF8String;
FMimeType: String;
FFileList: TStringList;
procedure LoadApplicationList;
public
@ -198,7 +198,7 @@ end;
procedure TfrmOpenWith.LoadApplicationList;
const
Folders: array [1..2] of UTF8String = ('/.local/share/applications',
Folders: array [1..2] of String = ('/.local/share/applications',
'/usr/share/applications');
var
I, J: Integer;

View file

@ -66,14 +66,14 @@ type
FTarExt,
FArchiveExt,
FArchiveName,
FArchiveType: UTF8String;
FArchiveType: String;
FArchiveTypeCount: Integer;
FHasFolder,
FExistsArchive : Boolean;
FSourceFileSource: IFileSource;
FCustomParams: UTF8String;
FCustomParams: String;
procedure SwitchOptions(ArcTypeChange: Boolean);
procedure AddArchiveType(const FileExt, ArcType: UTF8String);
procedure AddArchiveType(const FileExt, ArcType: String);
public
{ public declarations }
end;
@ -114,7 +114,7 @@ var
procedure Pack(var FilesToPack: TFiles; QueueIdentifier: TOperationsManagerQueueIdentifier);
var
sPassword,
sPasswordTmp: UTF8String;
sPasswordTmp: String;
begin
with PackDialog do
begin
@ -536,7 +536,7 @@ begin
end;
end;
procedure TfrmPackDlg.AddArchiveType(const FileExt, ArcType: UTF8String);
procedure TfrmPackDlg.AddArchiveType(const FileExt, ArcType: String);
var
iIndex: Integer;
begin

View file

@ -123,7 +123,7 @@ end;
procedure TfrmOptionsArchivers.btnMultiArcAddClick(Sender: TObject);
var
sName: UTF8String;
sName: String;
MultiArcItem: TMultiArcItem;
begin
if InputQuery(Caption, rsOptArchiveTypeName, sName) then
@ -180,7 +180,7 @@ end;
procedure TfrmOptionsArchivers.btnMultiArcRenameClick(Sender: TObject);
var
sNewName: UTF8String;
sNewName: String;
begin
if lbxMultiArc.ItemIndex < 0 then Exit;
sNewName:= lbxMultiArc.Items[lbxMultiArc.ItemIndex];

View file

@ -1011,10 +1011,10 @@ begin
try
case (ActionDispatcher and MASK_ACTION_WITH_WHAT) of
{$IFDEF MSWINDOWS}
ACTION_WITH_WINCMDINI: WorkingDirectoryList.ImportTotalCommander(utf8string(OpenDialog.Filename));
ACTION_WITH_WINCMDINI: WorkingDirectoryList.ImportTotalCommander(String(OpenDialog.Filename));
{$ENDIF}
ACTION_WITH_HOTLISTFILE: WorkingDirectoryList.ImportDoubleCommander(utf8string(OpenDialog.Filename));
ACTION_WITH_BACKUP: WorkingDirectoryList.ImportDoubleCommander(utf8string(OpenDialog.Filename));
ACTION_WITH_HOTLISTFILE: WorkingDirectoryList.ImportDoubleCommander(String(OpenDialog.Filename));
ACTION_WITH_BACKUP: WorkingDirectoryList.ImportDoubleCommander(String(OpenDialog.Filename));
end;
with Tfrmhotdirexportimport.Create(Application) do

View file

@ -113,7 +113,7 @@ end;
procedure TfrmOptionsFileTypesColors.btnSearchTemplateClick(Sender: TObject);
var
sMask: UTF8String;
sMask: String;
bTemplate: Boolean;
begin
sMask:= edtCategoryMask.Text;

View file

@ -558,7 +558,7 @@ var
WfxModule : TWFXmodule;
sFileName,
sPluginName,
sRootName: UTF8String;
sRootName: String;
begin
dmComData.OpenDialog.Filter := Format('File system plugins (%s)|%s', [WfxMask, WfxMask]);
if dmComData.OpenDialog.Execute then

View file

@ -691,7 +691,7 @@ end;
{ TfrmOptionsToolbar.btnOpenCmdDlgClick }
procedure TfrmOptionsToolbar.btnOpenCmdDlgClick(Sender: TObject);
var
WantedCommand:UTF8String;
WantedCommand:String;
IndexMaybe:longint;
begin
if cbInternalCommand.ItemIndex=-1 then

View file

@ -85,7 +85,7 @@ uses
procedure TfrmOptionsToolTips.btnFieldsSearchTemplateClick(Sender: TObject);
var
sMask: UTF8String;
sMask: String;
bTemplate: Boolean;
begin
if ShowMaskInputDlg(rsMarkPlus, rsMaskInput, glsMaskHistory, sMask) then

View file

@ -25,8 +25,8 @@ type
CancelSearchMode: TQuickSearchCancelMode;
end;
TOnChangeSearch = procedure(Sender: TObject; ASearchText: UTF8String; const ASearchOptions: TQuickSearchOptions) of Object;
TOnChangeFilter = procedure(Sender: TObject; AFilterText: UTF8String; const AFilterOptions: TQuickSearchOptions) of Object;
TOnChangeSearch = procedure(Sender: TObject; ASearchText: String; const ASearchOptions: TQuickSearchOptions) of Object;
TOnChangeFilter = procedure(Sender: TObject; AFilterText: String; const AFilterOptions: TQuickSearchOptions) of Object;
TOnExecute = procedure(Sender: TObject) of Object;
TOnHide = procedure(Sender: TObject) of Object;

View file

@ -28,14 +28,14 @@ type
end;
function ShowSelectTextRangeDlg(TheOwner: TCustomForm; const ACaption,
AText: UTF8String; out ASelection: TPoint): Boolean;
AText: String; out ASelection: TPoint): Boolean;
implementation
{$R *.lfm}
function ShowSelectTextRangeDlg(TheOwner: TCustomForm; const ACaption,
AText: UTF8String; out ASelection: TPoint): Boolean;
AText: String; out ASelection: TPoint): Boolean;
begin
with TfrmSelectTextRange.Create(TheOwner) do
try

View file

@ -133,43 +133,47 @@ end;
{ TfrmSetFileProperties }
procedure TfrmSetFileProperties.btnOKClick(Sender: TObject);
var
theNewProperties: TFileProperties;
begin
with FOperation do
begin
theNewProperties:= NewProperties;
if fpAttributes in SupportedProperties then
begin
if NewProperties[fpAttributes] is TNtfsFileAttributesProperty then
if theNewProperties[fpAttributes] is TNtfsFileAttributesProperty then
IncludeAttributes:= GetAttrFromForm(ExcludeAttributes);
if NewProperties[fpAttributes] is TUnixFileAttributesProperty then
if theNewProperties[fpAttributes] is TUnixFileAttributesProperty then
IncludeAttributes:= GetModeFromForm(ExcludeAttributes);
// Nothing changed, clear new property
if (IncludeAttributes = 0) and (ExcludeAttributes = 0) then
begin
NewProperties[fpAttributes].Free;
NewProperties[fpAttributes]:= nil;
theNewProperties[fpAttributes].Free;
theNewProperties[fpAttributes]:= nil;
end;
end;
if chkCreationTime.Checked then
(NewProperties[fpCreationTime] as TFileCreationDateTimeProperty).Value:= ZVCreationDateTime.DateTime
(theNewProperties[fpCreationTime] as TFileCreationDateTimeProperty).Value:= ZVCreationDateTime.DateTime
else
begin
NewProperties[fpCreationTime].Free;
NewProperties[fpCreationTime]:= nil;
theNewProperties[fpCreationTime].Free;
theNewProperties[fpCreationTime]:= nil;
end;
if chkLastWriteTime.Checked then
(NewProperties[fpModificationTime] as TFileModificationDateTimeProperty).Value:= ZVLastWriteDateTime.DateTime
(theNewProperties[fpModificationTime] as TFileModificationDateTimeProperty).Value:= ZVLastWriteDateTime.DateTime
else
begin
NewProperties[fpModificationTime].Free;
NewProperties[fpModificationTime]:= nil;
theNewProperties[fpModificationTime].Free;
theNewProperties[fpModificationTime]:= nil;
end;
if chkLastAccessTime.Checked then
(NewProperties[fpLastAccessTime] as TFileLastAccessDateTimeProperty).Value:= ZVLastAccessDateTime.DateTime
(theNewProperties[fpLastAccessTime] as TFileLastAccessDateTimeProperty).Value:= ZVLastAccessDateTime.DateTime
else
begin
NewProperties[fpLastAccessTime].Free;
NewProperties[fpLastAccessTime]:= nil;
theNewProperties[fpLastAccessTime].Free;
theNewProperties[fpLastAccessTime]:= nil;
end;
NewProperties:= theNewProperties;
Recursive:= chkRecursive.Checked;
end;
end;

View file

@ -66,7 +66,7 @@ type
{ ShowSplitterFileForm:
"TMainCommands.cm_FileSpliter" function from "uMainCommands.pas" is calling this routine.}
function ShowSplitterFileForm(aFileSource: IFileSource; var aFile: TFile; const TargetPath: UTF8String): Boolean;
function ShowSplitterFileForm(aFileSource: IFileSource; var aFile: TFile; const TargetPath: String): Boolean;
implementation
@ -82,7 +82,7 @@ uses
{ ShowSplitterFileForm:
"TMainCommands.cm_FileSpliter" function from "uMainCommands.pas" is calling this routine.}
function ShowSplitterFileForm(aFileSource: IFileSource; var aFile: TFile; const TargetPath: UTF8String): Boolean;
function ShowSplitterFileForm(aFileSource: IFileSource; var aFile: TFile; const TargetPath: String): Boolean;
var
Operation: TFileSourceSplitOperation = nil;
frmSplitter:TfrmSplitter;

View file

@ -211,7 +211,7 @@ end;
procedure TCheckContentThread.Execute;
function CompareFiles(fn1, fn2: UTF8String; len: Int64): Boolean;
function CompareFiles(fn1, fn2: String; len: Int64): Boolean;
const
BUFLEN = 1024 * 32;
var

View file

@ -255,7 +255,7 @@ type
ActivePlugin:Integer;
//---------------------
function GetListerRect: TRect;
function CheckPlugins(const sFileName: UTF8String; bForce: Boolean = False): Boolean;
function CheckPlugins(const sFileName: String; bForce: Boolean = False): Boolean;
function CheckGraphics(const sFileName:String):Boolean;
function LoadGraphics(const sFileName:String): Boolean;
procedure AdjustImageSize;
@ -281,8 +281,8 @@ type
constructor Create(TheOwner: TComponent; aFileSource: IFileSource; aQuickView: Boolean = False); overload;
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
procedure LoadFile(const aFileName: UTF8String);
procedure LoadNextFile(const aFileName: UTF8String);
procedure LoadFile(const aFileName: String);
procedure LoadNextFile(const aFileName: String);
procedure LoadFile(iIndex:Integer);
procedure ExitPluginMode;
@ -383,7 +383,7 @@ begin
tmp_all.Free;
end;
procedure TfrmViewer.LoadFile(const aFileName: UTF8String);
procedure TfrmViewer.LoadFile(const aFileName: String);
var
i: Integer;
dwFileAttributes: TFileAttrs;
@ -435,7 +435,7 @@ begin
end;
end;
procedure TfrmViewer.LoadNextFile(const aFileName: UTF8String);
procedure TfrmViewer.LoadNextFile(const aFileName: String);
var
ShowFlags: Integer;
begin
@ -1012,7 +1012,7 @@ begin
EndY:=0;
end;
function TfrmViewer.CheckPlugins(const sFileName: UTF8String; bForce: Boolean = False): Boolean;
function TfrmViewer.CheckPlugins(const sFileName: String; bForce: Boolean = False): Boolean;
var
I: Integer;
ShowFlags: Integer;
@ -1216,7 +1216,7 @@ procedure TfrmViewer.DrawPreviewDrawCell(Sender: TObject; aCol, aRow: Integer;
aRect: TRect; aState: TGridDrawState);
var
i,z,t, X, Y: Integer;
sExt, sName, shortName: UTF8String;
sExt, sName, shortName: String;
bmpThumb: TBitmap;
begin
aRect:= Classes.Rect(aRect.Left + 2, aRect.Top + 2, aRect.Right - 2, aRect.Bottom - 2);
@ -1964,7 +1964,7 @@ var
PAdr: PtrInt;
PAnsiAddr: PByte;
bTextFound: Boolean;
sSearchTextU: UTF8String;
sSearchTextU: String;
sSearchTextA: AnsiString;
iSearchParameter: Integer;
RecodeTable: TRecodeTable;

View file

@ -82,8 +82,8 @@ type
constructor Create; reintroduce;
end;
function NtfsHourTimeDelay(const SourceName, TargetName: UTF8String): Boolean;
function FileIsLinkToFolder(const FileName: UTF8String; out LinkTarget: UTF8String): Boolean;
function NtfsHourTimeDelay(const SourceName, TargetName: String): Boolean;
function FileIsLinkToFolder(const FileName: String; out LinkTarget: String): Boolean;
{en
Execute command line
}
@ -106,14 +106,14 @@ function ExecCmdFork(sCmd: String; sParams: String; sStartPath: String = ''; bSh
@param(URL File name or URL)
@returns(The function returns @true if successful, @false otherwise)
}
function ShellExecute(URL: UTF8String): Boolean;
function ShellExecute(URL: String): Boolean;
function GetDiskFreeSpace(const Path : String; out FreeSize, TotalSize : Int64) : Boolean;
{en
Get maximum file size for a mounted file system
@param(Path The pathname of any file within the mounted file system)
@returns(The maximum file size for a mounted file system)
}
function GetDiskMaxFileSize(const Path : UTF8String) : Int64;
function GetDiskMaxFileSize(const Path : String) : Int64;
{en
Create a hard link to a file
@param(Path Name of file)
@ -164,7 +164,7 @@ function GetAppConfigDir: String;
Get the appropriate directory for the application's cache files
@returns(The directory for the application's cache files)
}
function GetAppCacheDir: UTF8String;
function GetAppCacheDir: String;
function GetTempFolder: String;
{ Similar to "GetTempFolder" but that we can unilaterally delete at the end when closin application}
@ -190,36 +190,36 @@ procedure FormatTerminal(var sCmd: String; var sParams: String; bKeepTerminalOpe
{en
Same as mbFileGetAttr, but dereferences any encountered links.
}
function mbFileGetAttrNoLinks(const FileName: UTF8String): TFileAttrs;
function mbFileGetAttrNoLinks(const FileName: String): TFileAttrs;
{en
Convert file name to system encoding, if name can not be represented in
current locale then use short file name under Windows.
}
function mbFileNameToSysEnc(const LongPath: UTF8String): String;
function mbGetEnvironmentVariable(const sName: UTF8String): UTF8String;
function mbSetEnvironmentVariable(const sName, sValue: UTF8String): Boolean;
function mbFileNameToSysEnc(const LongPath: String): String;
function mbGetEnvironmentVariable(const sName: String): String;
function mbSetEnvironmentVariable(const sName, sValue: String): Boolean;
{en
Extract the root directory part of a file name.
@returns(Drive letter under Windows and mount point under Unix)
}
function ExtractRootDir(const FileName: UTF8String): UTF8String;
function ExtractRootDir(const FileName: String): String;
procedure FixFormIcon(Handle: LCLType.HWND);
procedure HideConsoleWindow;
procedure FixDateNamesToUTF8;
function ParamStrU(Param: Integer): UTF8String; overload;
function ParamStrU(const Param: String): UTF8String; overload;
function ParamStrU(Param: Integer): String; overload;
function ParamStrU(const Param: String): String; overload;
{en
Get the current username of the current session
}
function GetCurrentUserName : UTF8String;
function GetCurrentUserName : String;
{en
Get the current machine name
}
function GetComputerNetName: UTF8String;
function GetComputerNetName: String;
implementation
@ -239,8 +239,8 @@ uses
{$ENDIF}
;
function FileIsLinkToFolder(const FileName: UTF8String; out
LinkTarget: UTF8String): Boolean;
function FileIsLinkToFolder(const FileName: String; out
LinkTarget: String): Boolean;
{$IF DEFINED(MSWINDOWS)}
begin
Result:= False;
@ -392,7 +392,7 @@ begin
end;
{$ENDIF}
function ShellExecute(URL: UTF8String): Boolean;
function ShellExecute(URL: String): Boolean;
{$IF DEFINED(MSWINDOWS)}
var
Return: HINST;
@ -431,7 +431,7 @@ begin
end;
{$ELSE}
var
sCmdLine: UTF8String;
sCmdLine: String;
begin
Result:= False;
sCmdLine:= EmptyStr;
@ -485,7 +485,7 @@ begin
end;
{$ENDIF}
function GetDiskMaxFileSize(const Path: UTF8String): Int64;
function GetDiskMaxFileSize(const Path: String): Int64;
{$IFDEF UNIX}
const
MSDOS_SUPER_MAGIC = $4d44;
@ -526,7 +526,7 @@ begin
end;
{$ENDIF}
function NtfsHourTimeDelay(const SourceName, TargetName: UTF8String): Boolean;
function NtfsHourTimeDelay(const SourceName, TargetName: String): Boolean;
{$IFDEF MSWINDOWS}
var
lpDummy: DWORD = 0;
@ -821,7 +821,7 @@ begin
end;
{$ENDIF}
function GetAppCacheDir: UTF8String;
function GetAppCacheDir: String;
{$IF DEFINED(MSWINDOWS)}
var
APath: array[0..MAX_PATH] of WideChar;
@ -950,7 +950,7 @@ begin
end;
{$ENDIF}
function mbFileGetAttrNoLinks(const FileName: UTF8String): TFileAttrs;
function mbFileGetAttrNoLinks(const FileName: String): TFileAttrs;
{$IFDEF UNIX}
var
Info: BaseUnix.Stat;
@ -962,7 +962,7 @@ begin
end;
{$ELSE}
var
LinkTarget: UTF8String;
LinkTarget: String;
begin
LinkTarget := mbReadAllLinks(FileName);
if LinkTarget <> '' then
@ -972,7 +972,7 @@ begin
end;
{$ENDIF}
function mbFileNameToSysEnc(const LongPath: UTF8String): String;
function mbFileNameToSysEnc(const LongPath: String): String;
{$IFDEF MSWINDOWS}
begin
Result:= UTF8ToSys(LongPath);
@ -985,7 +985,7 @@ begin
end;
{$ENDIF}
function mbGetEnvironmentVariable(const sName: UTF8String): UTF8String;
function mbGetEnvironmentVariable(const sName: String): String;
{$IFDEF MSWINDOWS}
var
wsName: WideString;
@ -1018,7 +1018,7 @@ begin
end;
{$ENDIF}
function mbSetEnvironmentVariable(const sName, sValue: UTF8String): Boolean;
function mbSetEnvironmentVariable(const sName, sValue: String): Boolean;
{$IFDEF MSWINDOWS}
var
wsName,
@ -1034,7 +1034,7 @@ begin
end;
{$ENDIF}
function ExtractRootDir(const FileName: UTF8String): UTF8String;
function ExtractRootDir(const FileName: String): String;
{$IFDEF UNIX}
begin
Result:= ExcludeTrailingPathDelimiter(FindMountPointPath(ExcludeTrailingPathDelimiter(FileName)));
@ -1079,7 +1079,7 @@ begin
end;
end;
function ParamStrU(Param: Integer): UTF8String;
function ParamStrU(Param: Integer): String;
{$IFDEF UNIX}
begin
Result:= SysToUTF8(ObjPas.ParamStr(Param));
@ -1093,7 +1093,7 @@ begin
end;
{$ENDIF}
function ParamStrU(const Param: String): UTF8String;
function ParamStrU(const Param: String): String;
{$IFDEF UNIX}
begin
Result:= SysToUTF8(Param);
@ -1112,7 +1112,7 @@ begin
end;
{ GetCurrentUserName }
function GetCurrentUserName : UTF8String;
function GetCurrentUserName : String;
{$IF DEFINED(MSWINDOWS)}
var
wsUserName : WideString;
@ -1134,7 +1134,7 @@ end;
{$ENDIF}
{ GetComputerNetName }
function GetComputerNetName: UTF8String;
function GetComputerNetName: String;
{$IF DEFINED(MSWINDOWS)}
var
Size: DWORD = MAX_PATH;

View file

@ -97,7 +97,7 @@ type
@returns(List of filenames or nil in case of an error.)
}
function GetDropFileGroupFilenames(const dataObj: IDataObject; var Medium: TSTGMedium; Format: TFormatETC): TStringList;
function SaveCfuContentToFile(const dataObj:IDataObject; Index:Integer; WantedFilename:UTF8String; WantedCreationTime, WantedModificationTime, WantedLastAccessTime:DCBasicTypes.TFileTime):boolean;
function SaveCfuContentToFile(const dataObj:IDataObject; Index:Integer; WantedFilename:String; WantedCreationTime, WantedModificationTime, WantedLastAccessTime:DCBasicTypes.TFileTime):boolean;
{en
Retrieves the text from the CF_UNICODETEXT/CF_TEXT format, will store this in a single file
@ -798,7 +798,7 @@ var
i: Integer;
DropInfo: TDragDropInfo;
FileNames, DragTextModeOfferedList: TStringList;
SelectedFormatName:UTF8String;
SelectedFormatName:String;
DropEffect: TDropEffect;
Enum: IEnumFormatEtc;
DragAndDropSupportedFormatList:TStringList;
@ -988,7 +988,7 @@ begin
end;
{ TFileDropTarget.SaveCfuContentToFile }
function TFileDropTarget.SaveCfuContentToFile(const dataObj:IDataObject; Index:Integer; WantedFilename:UTF8String; WantedCreationTime, WantedModificationTime, WantedLastAccessTime:DCBasicTypes.TFileTime):boolean;
function TFileDropTarget.SaveCfuContentToFile(const dataObj:IDataObject; Index:Integer; WantedFilename:String; WantedCreationTime, WantedModificationTime, WantedLastAccessTime:DCBasicTypes.TFileTime):boolean;
const
TEMPFILENAME='CfuContentFile.bin';
var
@ -1066,7 +1066,7 @@ var
DC_FileDescriptorW: FILEDESCRIPTORW;
DC_FileDescriptor: FILEDESCRIPTOR;
NumberOfFiles, CopyNumber, IndexFile: integer;
ActualFilename, DroppedTextFilename: UTF8String;
ActualFilename, DroppedTextFilename: String;
SuffixStr: string;
WantedCreationTime, WantedModificationTime, WantedLastAccessTime : DCBasicTypes.TFileTime;
begin
@ -1151,7 +1151,7 @@ var
AnyPointer: Pointer;
UnicodeCharPointer: PUnicodeChar;
hFile: THandle;
DroppedTextFilename: UTF8String;
DroppedTextFilename: String;
MyUnicodeString: UnicodeString;
procedure SetDefaultFilename;

View file

@ -95,7 +95,7 @@ const
Reads file into strings.
Returns @false if file not found or cannot be read.
}
function GetStringsFromFile(FileName: UTF8String; out sl: TStringListEx): Boolean;
function GetStringsFromFile(FileName: String; out sl: TStringListEx): Boolean;
begin
Result := False;
sl := nil;
@ -115,7 +115,7 @@ end;
Reads first line of file into a string.
Returns @false if file not found or cannot be read.
}
function GetStringFromFile(FileName: UTF8String; out str: String): Boolean;
function GetStringFromFile(FileName: String; out str: String): Boolean;
var
sl: TStringListEx;
begin

View file

@ -57,7 +57,7 @@ const
{$ENDIF}
;
PluginBinaryTypeString: array[TBinaryType] of UTF8String =
PluginBinaryTypeString: array[TBinaryType] of String =
(
'Unknown',
'Windows 32 bit',
@ -69,8 +69,8 @@ const
);
procedure UpdatePlugins;
function CheckPlugin(var FileName: UTF8String): Boolean;
function GetPluginBinaryType(const FileName: UTF8String): TBinaryType;
function CheckPlugin(var FileName: String): Boolean;
function GetPluginBinaryType(const FileName: String): TBinaryType;
implementation
@ -80,7 +80,7 @@ uses
procedure UpdatePlugins;
var
I: Integer;
Folder: UTF8String;
Folder: String;
begin
// Wcx plugins
Folder:= '%commander_path%' + PathDelim + 'plugins' + PathDelim + 'wcx' + PathDelim;
@ -306,7 +306,7 @@ begin
{$ENDIF}
end;
function CheckPlugin(var FileName: UTF8String): Boolean;
function CheckPlugin(var FileName: String): Boolean;
var
PluginType: TBinaryType;
begin
@ -331,7 +331,7 @@ begin
Result:= False;
end;
function GetPluginBinaryType(const FileName: UTF8String): TBinaryType;
function GetPluginBinaryType(const FileName: String): TBinaryType;
var
fsFileStream: TFileStreamEx;
begin

View file

@ -73,7 +73,7 @@ type
TFakeClass = class
public
procedure OnMountWatcherNotify(Sender: TObject);
procedure OnUDisksNotify(Reason: TUDisksMethod; const ObjectPath: UTF8String);
procedure OnUDisksNotify(Reason: TUDisksMethod; const ObjectPath: String);
end;
{$ENDIF}
@ -322,7 +322,7 @@ begin
Result := False;
end;
function UDisksGetDeviceInfo(const DeviceObjectPath: UTF8String;
function UDisksGetDeviceInfo(const DeviceObjectPath: String;
const Devices: TUDisksDevicesInfos;
out DeviceInfo: TUDisksDeviceInfo): Boolean;
var
@ -689,7 +689,7 @@ var
end;
function UDisksGetDevice(const UDisksDevices: TUDisksDevicesInfos;
var DeviceFile: String; out UDisksDeviceObject: UTF8String): Boolean;
var DeviceFile: String; out UDisksDeviceObject: String): Boolean;
begin
// Handle "/dev/", "UUID=" and "LABEL=" through UDisks if available.
if StrBegins(DeviceFile, 'UUID=') then
@ -731,7 +731,7 @@ var
I: Integer;
UDisksDevices: TUDisksDevicesInfos;
UDisksDevice: TUDisksDeviceInfo;
UDisksDeviceObject: UTF8String;
UDisksDeviceObject: String;
DeviceFile: String;
MountPoint: String;
HandledByUDisks: Boolean = False;
@ -1086,7 +1086,7 @@ begin
DoDriveChanged(ADrive);
end;
procedure TFakeClass.OnUDisksNotify(Reason: TUDisksMethod; const ObjectPath: UTF8String);
procedure TFakeClass.OnUDisksNotify(Reason: TUDisksMethod; const ObjectPath: String);
var
Result: Boolean;
ADrive: PDrive = nil;

View file

@ -43,10 +43,10 @@ type
TFSWatcherEventTypes = set of TFSWatcherEventType;
TFSWatcherEventData = record
Path: UTF8String;
Path: String;
EventType: TFSWatcherEventType;
FileName: UTF8String; // Valid for fswFileCreated, fswFileChanged, fswFileDeleted, fswFileRenamed
NewFileName: UTF8String; // Valid for fswFileRenamed
FileName: String; // Valid for fswFileCreated, fswFileChanged, fswFileDeleted, fswFileRenamed
NewFileName: String; // Valid for fswFileRenamed
UserData: Pointer;
end;
PFSWatcherEventData = ^TFSWatcherEventData;
@ -63,11 +63,11 @@ type
{en
Returns @true if watch has been successfully added or already exists.
}
class function AddWatch(aWatchPath: UTF8String;
class function AddWatch(aWatchPath: String;
aWatchFilter: TFSWatchFilter;
aWatcherEvent: TFSWatcherEvent;
UserData: Pointer = nil): Boolean;
class procedure RemoveWatch(aWatchPath: UTF8String;
class procedure RemoveWatch(aWatchPath: String;
aWatcherEvent: TFSWatcherEvent);
class procedure RemoveWatch(aWatcherEvent: TFSWatcherEvent);
class function CanWatch(const WatchPaths: array of String): Boolean;
@ -96,14 +96,14 @@ var
VAR_READDIRECTORYCHANGESW_BUFFERSIZE: DWORD = READDIRECTORYCHANGESW_BUFFERSIZE;
CREATEFILEW_SHAREMODE: DWORD = FILE_SHARE_READ or FILE_SHARE_WRITE;
function GetTargetPath(const Path: UTF8String): UTF8String;
function GetTargetPath(const Path: String): String;
begin
Result := mbReadAllLinks(Path);
if Result = EmptyStr then
Result := Path;
end;
function GetDriveOfPath(const Path: UTF8String): UTF8String;
function GetDriveOfPath(const Path: String): String;
begin
Result := ExtractFileDrive(GetTargetPath(Path)) + PathDelim;
end;
@ -115,8 +115,8 @@ type
WatcherEvent: TFSWatcherEvent;
WatchFilter: TFSWatchFilter;
{$IF DEFINED(MSWINDOWS)}
RegisteredWatchPath: UTF8String; // Path that was registered to watch (for watching whole drive mode).
TargetWatchPath: UTF8String; // What path is actually to be watched (for watching whole drive mode).
RegisteredWatchPath: String; // Path that was registered to watch (for watching whole drive mode).
TargetWatchPath: String; // What path is actually to be watched (for watching whole drive mode).
{$ENDIF}
end;
TOSWatchObservers = specialize TFPGObjectList<TOSWatchObserver>;
@ -126,13 +126,13 @@ type
FHandle: THandle;
FObservers: TOSWatchObservers;
FWatchFilter: TFSWatchFilter;
FWatchPath: UTF8String;
FWatchPath: String;
{$IF DEFINED(MSWINDOWS)}
FOverlapped: OVERLAPPED;
FBuffer: PByte;
FNotifyFilter: DWORD;
FReferenceCount: LongInt;
FOldFileName: UTF8String; // for FILE_ACTION_RENAMED_OLD_NAME action
FOldFileName: String; // for FILE_ACTION_RENAMED_OLD_NAME action
{$ENDIF}
{$IF DEFINED(UNIX)}
FNotifyHandle: THandle;
@ -145,7 +145,7 @@ type
procedure SetFilter(aWatchFilter: TFSWatchFilter);
{$ENDIF}
public
constructor Create(const aWatchPath: UTF8String
constructor Create(const aWatchPath: String
{$IFDEF UNIX}; aNotifyHandle: THandle{$ENDIF}); reintroduce;
destructor Destroy; override;
procedure UpdateFilter;
@ -155,7 +155,7 @@ type
{$ENDIF}
property Handle: THandle read FHandle;
property Observers: TOSWatchObservers read FObservers;
property WatchPath: UTF8String read FWatchPath;
property WatchPath: String read FWatchPath;
end;
TOSWatchs = specialize TFPGObjectList<TOSWatch>;
@ -176,9 +176,9 @@ type
procedure DoWatcherEvent;
function GetWatchersCount: Integer;
function GetWatchPath(var aWatchPath: UTF8String): Boolean;
function GetWatchPath(var aWatchPath: String): Boolean;
{$IF DEFINED(MSWINDOWS)}
function IsPathObserved(Watch: TOSWatch; FileName: UTF8String): Boolean;
function IsPathObserved(Watch: TOSWatch; FileName: String): Boolean;
{$ENDIF}
{en
Call only under FWatcherLock.
@ -197,11 +197,11 @@ type
constructor Create;
destructor Destroy; override;
procedure Terminate;
function AddWatch(aWatchPath: UTF8String;
function AddWatch(aWatchPath: String;
aWatchFilter: TFSWatchFilter;
aWatcherEvent: TFSWatcherEvent;
UserData: Pointer = nil): Boolean;
procedure RemoveWatch(aWatchPath: UTF8String;
procedure RemoveWatch(aWatchPath: String;
aWatcherEvent: TFSWatcherEvent);
procedure RemoveWatch(aWatcherEvent: TFSWatcherEvent);
property WatchersCount: Integer read GetWatchersCount;
@ -239,7 +239,7 @@ begin
end;
end;
class function TFileSystemWatcher.AddWatch(aWatchPath: UTF8String;
class function TFileSystemWatcher.AddWatch(aWatchPath: String;
aWatchFilter: TFSWatchFilter;
aWatcherEvent: TFSWatcherEvent;
UserData: Pointer = nil): Boolean;
@ -251,7 +251,7 @@ begin
Result := False;
end;
class procedure TFileSystemWatcher.RemoveWatch(aWatchPath: UTF8String;
class procedure TFileSystemWatcher.RemoveWatch(aWatchPath: String;
aWatcherEvent: TFSWatcherEvent);
begin
if Assigned(FileSystemWatcher) then
@ -815,7 +815,7 @@ begin
end; { try - finally }
end;
function TFileSystemWatcherImpl.GetWatchPath(var aWatchPath: UTF8String): Boolean;
function TFileSystemWatcherImpl.GetWatchPath(var aWatchPath: String): Boolean;
begin
Result := True;
{$IFDEF UNIX}
@ -834,10 +834,10 @@ begin
end;
{$IF DEFINED(MSWINDOWS)}
function TFileSystemWatcherImpl.IsPathObserved(Watch: TOSWatch; FileName: UTF8String): Boolean;
function TFileSystemWatcherImpl.IsPathObserved(Watch: TOSWatch; FileName: String): Boolean;
var
j: Integer;
Path: UTF8String;
Path: String;
begin
Path := UTF8UpperCase(Watch.WatchPath + FileName);
@ -966,7 +966,7 @@ begin
TriggerTerminateEvent;
end;
function TFileSystemWatcherImpl.AddWatch(aWatchPath: UTF8String;
function TFileSystemWatcherImpl.AddWatch(aWatchPath: String;
aWatchFilter: TFSWatchFilter;
aWatcherEvent: TFSWatcherEvent;
UserData: Pointer): Boolean;
@ -977,7 +977,7 @@ var
i, j: Integer;
WatcherIndex: Integer = -1;
{$IFDEF MSWINDOWS}
RegisteredPath: UTF8String;
RegisteredPath: String;
{$ENDIF}
begin
if (aWatchPath = '') or (aWatcherEvent = nil) then
@ -1055,7 +1055,7 @@ begin
end;
end;
procedure TFileSystemWatcherImpl.RemoveWatch(aWatchPath: UTF8String;
procedure TFileSystemWatcherImpl.RemoveWatch(aWatchPath: String;
aWatcherEvent: TFSWatcherEvent);
var
i: Integer;
@ -1188,7 +1188,7 @@ end;
{ TOSWatch }
constructor TOSWatch.Create(const aWatchPath: UTF8String
constructor TOSWatch.Create(const aWatchPath: String
{$IFDEF UNIX}; aNotifyHandle: THandle{$ENDIF});
begin
FObservers := TOSWatchObservers.Create(True);

View file

@ -55,7 +55,7 @@ type
Time : DCBasicTypes.TFileTime; // modification time
Size : Int64;
Attr : TFileAttrs;
Name : UTF8String;
Name : String;
ExcludeAttr : TFileAttrs;
{$ifdef unix}
FindHandle : Pointer;
@ -76,7 +76,7 @@ type
{$endif}
end;
function FindFirstEx (const Path : UTF8String; Attr : TFileAttrs; out SearchRec : TSearchRecEx) : Longint;
function FindFirstEx (const Path : String; Attr : TFileAttrs; out SearchRec : TSearchRecEx) : Longint;
function FindNextEx (var SearchRec : TSearchRecEx) : Longint;
procedure FindCloseEx(var SearchRec: TSearchRecEx);
function CheckAttrMask(DefaultAttr : TFileAttrs; sAttr : String; Attr : TFileAttrs) : Boolean;
@ -139,7 +139,7 @@ begin
end;
{$ENDIF}
function FindFirstEx (const Path : UTF8String; Attr : TFileAttrs; out SearchRec : TSearchRecEx) : Longint;
function FindFirstEx (const Path : String; Attr : TFileAttrs; out SearchRec : TSearchRecEx) : Longint;
{$IFDEF MSWINDOWS}
var
wPath: WideString;

View file

@ -61,25 +61,25 @@ type
protected
FTheme,
FThemeName: String;
FComment: UTF8String;
FComment: String;
FInherits: TStringList;
FOwnsInheritsObject: Boolean;
FDirectories: TIconDirList;
FBaseDirList: array of String; //en> List of directories that have this theme's icons.
FBaseDirListAtCreate: array of String; //en> Base dir list passed to Create
function LoadIconDirInfo(const IniFile: TIniFileEx; const sIconDirName: String): PIconDirInfo;
function FindIconHelper(aIconName: String; AIconSize: Integer): UTF8String;
function FindIconHelper(aIconName: String; AIconSize: Integer): String;
function LoadThemeWithInherited(AInherits: TStringList): Boolean;
procedure LoadParentTheme(AThemeName: String);
procedure CacheDirectoryFiles(SubDirIndex: Integer; BaseDirIndex: Integer);
protected
function LookupIcon(AIconName: String; AIconSize: Integer): UTF8String;
function LookupIcon(AIconName: String; AIconSize: Integer): String;
function CreateParentTheme(const sThemeName: String): TIconTheme; virtual;
public
constructor Create(sThemeName: String; BaseDirList: array of String); virtual;
destructor Destroy; override;
function Load: Boolean; virtual;
function FindIcon(AIconName: String; AIconSize: Integer): UTF8String;
function FindIcon(AIconName: String; AIconSize: Integer): String;
function DirectoryMatchesSize(SubDirIndex: Integer; AIconSize: Integer): Boolean;
function DirectorySizeDistance(SubDirIndex: Integer; AIconSize: Integer): Integer;
class function CutTrailingExtension(const AIconName: String): String;
@ -98,7 +98,7 @@ var
{ TIconTheme }
function LookupFallbackIcon (AIconName: String): UTF8String;
function LookupFallbackIcon (AIconName: String): String;
begin
(*
for each directory in $(basename list) {
@ -291,7 +291,7 @@ begin
end;
end;
function TIconTheme.FindIcon(AIconName: String; AIconSize: Integer): UTF8String;
function TIconTheme.FindIcon(AIconName: String; AIconSize: Integer): String;
begin
Result:= FindIconHelper(AIconName, AIconSize);
{
@ -300,7 +300,7 @@ begin
}
end;
function TIconTheme.LookupIcon(AIconName: String; AIconSize: Integer): UTF8String;
function TIconTheme.LookupIcon(AIconName: String; AIconSize: Integer): String;
var
I, J, FoundIndex: Integer;
MinimalSize,
@ -390,7 +390,7 @@ begin
end;
end;
function TIconTheme.FindIconHelper(aIconName: String; AIconSize: Integer): UTF8String;
function TIconTheme.FindIconHelper(aIconName: String; AIconSize: Integer): String;
var
I: Integer;
begin

View file

@ -12,9 +12,9 @@ type
{ THintItem }
THintItem = class
Name: UTF8String;
Mask: UTF8String;
Hint: UTF8String;
Name: String;
Mask: String;
Hint: String;
function Clone: THintItem;
end;
@ -35,7 +35,7 @@ type
procedure Clear;
function GetFileInfoToolTip(aFileSource: IFileSource; const aFile: TFile): UTF8String;
function GetFileInfoToolTip(aFileSource: IFileSource; const aFile: TFile): String;
procedure Load(AConfig: TXmlConfig; ANode: TXmlNode);
procedure Save(AConfig: TXmlConfig; ANode: TXmlNode);
@ -43,7 +43,7 @@ type
property HintItemList: THintItemList read FHintItemList;
end;
function GetFileInfoToolTip(aFileSource: IFileSource; const aFile: TFile): UTF8String;
function GetFileInfoToolTip(aFileSource: IFileSource; const aFile: TFile): String;
implementation
@ -55,9 +55,9 @@ uses
{$ENDIF}
;
function GetFileInfoToolTip(aFileSource: IFileSource; const aFile: TFile): UTF8String;
function GetFileInfoToolTip(aFileSource: IFileSource; const aFile: TFile): String;
function GetDefaultToolTip(const Hint: UTF8String): UTF8String;
function GetDefaultToolTip(const Hint: String): String;
begin
Result:= Hint;
if fpModificationTime in aFile.SupportedProperties then
@ -135,7 +135,7 @@ begin
end;
function TFileInfoToolTip.GetFileInfoToolTip(aFileSource: IFileSource;
const aFile: TFile): UTF8String;
const aFile: TFile): String;
var
I, J: Integer;
HintItem: THintItem;
@ -172,7 +172,7 @@ procedure TFileInfoToolTip.Load(AConfig: TXmlConfig; ANode: TXmlNode);
var
sMask,
sName,
sHint: UTF8String;
sHint: String;
MaskItem: THintItem;
begin
Clear;

View file

@ -221,7 +221,7 @@ var
{$ENDIF}
var
VKToCharArray: array[Low(Byte)..High(Byte)] of UTF8String;
VKToCharArray: array[Low(Byte)..High(Byte)] of String;
{$IF DEFINED(LCLGTK)}
function XKeycodeToKeysym(para1:PDisplay; para2:TKeyCode; index:integer):TKeySym;cdecl;external libX11;

View file

@ -58,11 +58,11 @@ function GetDesktopEntries(FileNames: TStringList): TList;
Needs absolute file names.
Returns a default application command line.
}
function GetDefaultAppCmd(FileNames: TStringList): UTF8String;
function GetDefaultAppCmd(FileNames: TStringList): String;
{en
Get desktop entry by desktop file name.
}
function GetDesktopEntry(const FileName: UTF8String): PDesktopFileEntry;
function GetDesktopEntry(const FileName: String): PDesktopFileEntry;
{en
Adds a new action for given mimetype.
@param(MimeType File mime type)
@ -70,7 +70,7 @@ function GetDesktopEntry(const FileName: UTF8String): PDesktopFileEntry;
@param(DefaultAction Set as default action for this mime type)
@returns(The function returns @true if successful, @false otherwise)
}
function AddDesktopEntry(const MimeType, DesktopEntry: UTF8String;
function AddDesktopEntry(const MimeType, DesktopEntry: String;
DefaultAction: Boolean): Boolean;
function TranslateAppExecToCmdLine(const entry: PDesktopFileEntry;
@ -303,7 +303,7 @@ const
MIME_INFO_CACHE = 'mimeinfo.cache';
var
MimeCache: TKeyFile;
FileName: UTF8String;
FileName: String;
AValue: TDynamicStringArray;
begin
FileName:= IncludeTrailingBackslash(Path) + MIME_INFO_CACHE;
@ -407,7 +407,7 @@ begin
end;
end;
function GetDefaultAppCmd(FileNames: TStringList): UTF8String;
function GetDefaultAppCmd(FileNames: TStringList): String;
var
I: Integer;
Action: String;
@ -418,7 +418,7 @@ var
MimeTypes: TDynamicStringArray;
MimeAppsPath: TDynamicStringArray;
function GetAppExec: UTF8String;
function GetAppExec: String;
begin
if Length(Action) > 0 then
begin
@ -495,7 +495,7 @@ begin
end; //for
end;
function GetDesktopEntry(const FileName: UTF8String): PDesktopFileEntry;
function GetDesktopEntry(const FileName: String): PDesktopFileEntry;
var
DesktopEntryFile: TKeyFile;
begin
@ -538,15 +538,15 @@ begin
end;
end;
function AddDesktopEntry(const MimeType, DesktopEntry: UTF8String; DefaultAction: Boolean): Boolean;
function AddDesktopEntry(const MimeType, DesktopEntry: String; DefaultAction: Boolean): Boolean;
var
CustomFile: UTF8String;
UserDataDir: UTF8String;
CustomFile: String;
UserDataDir: String;
DesktopFile: TIniFileEx;
MimeTypeValue: UTF8String;
MimeApps: UTF8String = '/applications/mimeapps.list';
MimeTypeValue: String;
MimeApps: String = '/applications/mimeapps.list';
procedure UpdateDesktop(const Group: UTF8String);
procedure UpdateDesktop(const Group: String);
begin
// Read current actions of this mime type
MimeTypeValue:= DesktopFile.ReadString(Group, MimeType, EmptyStr);

File diff suppressed because one or more lines are too long

View file

@ -36,11 +36,11 @@ uses
{en
Get file mime type.
}
function GetFileMimeType(const FileName: UTF8String): UTF8String;
function GetFileMimeType(const FileName: String): String;
{en
Get file mime type with parents.
}
function GetFileMimeTypes(const FileName: UTF8String): TDynamicStringArray;
function GetFileMimeTypes(const FileName: String): TDynamicStringArray;
implementation
@ -70,7 +70,7 @@ const
var
I: Integer;
Cache: PMimeCache;
FileName: UTF8String;
FileName: String;
Path: TDynamicStringArray;
begin
caches := TFPList.Create;
@ -173,13 +173,13 @@ end;
* efifciency, too. Otherwise, the function will try to get the basename of
* the specified file again.
*)
function mime_type_get_by_file(const filepath: UTF8String; max_extent: cint): UTF8String;
function mime_type_get_by_file(const filepath: String; max_extent: cint): String;
var
data: PByte;
i, len: cint;
fd: cint = -1;
mime_type: PAnsiChar;
FileName: UTF8String;
FileName: String;
begin
FileName := ExtractFileName(FilePath);
mime_type := mime_type_get_by_filename(PAnsiChar(FileName));
@ -278,7 +278,7 @@ begin
end;
end;
function GetFileMimeType(const FileName: UTF8String): UTF8String;
function GetFileMimeType(const FileName: String): String;
var
Stat: TStat;
MaxExtent: LongWord;
@ -309,7 +309,7 @@ begin
Result:= 'inode/socket';
end;
function GetFileMimeTypes(const FileName: UTF8String): TDynamicStringArray;
function GetFileMimeTypes(const FileName: String): TDynamicStringArray;
var
MimeType: String;
begin

View file

@ -177,7 +177,7 @@ begin
end;
end;
function GetThumbnail(const aFileName: UTF8String; aSize: TSize): Graphics.TBitmap;
function GetThumbnail(const aFileName: String; aSize: TSize): Graphics.TBitmap;
var
Scale: Boolean;
Cairo: Pcairo_t;

View file

@ -31,11 +31,11 @@ interface
uses
Classes, SysUtils, DCBasicTypes;
function GioOpen(const Uri: UTF8String): Boolean;
function GioGetIconTheme(const Scheme: UTF8String): UTF8String;
function GioFileGetIcon(const FileName: UTF8String): UTF8String;
function GioMimeTypeGetActions(const MimeType: UTF8String): TDynamicStringArray;
function GioGetMimeType(const FileName: UTF8String; MaxExtent: LongWord): UTF8String;
function GioOpen(const Uri: String): Boolean;
function GioGetIconTheme(const Scheme: String): String;
function GioFileGetIcon(const FileName: String): String;
function GioMimeTypeGetActions(const MimeType: String): TDynamicStringArray;
function GioGetMimeType(const FileName: String; MaxExtent: LongWord): String;
var
HasGio: Boolean = True;
@ -45,7 +45,7 @@ implementation
uses
DCStrUtils, DCClassesUtf8, uGlib2, uGObject2, uGio2;
function GioOpen(const Uri: UTF8String): Boolean;
function GioOpen(const Uri: String): Boolean;
var
AFile: PGFile;
AFileList: TGList;
@ -75,7 +75,7 @@ begin
end;
end;
function GioGetIconTheme(const Scheme: UTF8String): UTF8String;
function GioGetIconTheme(const Scheme: String): String;
var
Theme: Pgchar;
Settings: PGSettings;
@ -106,7 +106,7 @@ begin
end;
end;
function GioFileGetIcon(const FileName: UTF8String): UTF8String;
function GioFileGetIcon(const FileName: String): String;
var
GFile: PGFile;
GIcon: PGIcon;
@ -129,7 +129,7 @@ begin
g_object_unref(PGObject(GFile));
end;
function GioMimeTypeGetActions(const MimeType: UTF8String): TDynamicStringArray;
function GioMimeTypeGetActions(const MimeType: String): TDynamicStringArray;
var
AppList,
TempList: PGList;
@ -149,7 +149,7 @@ begin
end;
end;
function GioGetMimeType(const FileName: UTF8String; MaxExtent: LongWord): UTF8String;
function GioGetMimeType(const FileName: String; MaxExtent: LongWord): String;
var
Size: gsize;
MimeType: Pgchar;

View file

@ -32,7 +32,7 @@ uses
Classes, SysUtils, Types, Graphics, FPReadJPEG, IntfGraphics, GraphType,
DCClassesUtf8, uReSample, uThumbnails;
function GetThumbnail(const aFileName: UTF8String; aSize: TSize): Graphics.TBitmap;
function GetThumbnail(const aFileName: String; aSize: TSize): Graphics.TBitmap;
var
Bitmap: TBitmap;
RawImage: TRawImage;

View file

@ -40,12 +40,12 @@ uses
uDCUtils, uGlobs, uGlobsPaths, uOSUtils, uTrash, uPython;
var
PythonScript: UTF8String = 'scripts/doublecmd-kde.py';
PythonScript: String = 'scripts/doublecmd-kde.py';
function ShowOpenWithDialog(const FileList: TStringList): Boolean;
var
I: Integer;
Args: UTF8String;
Args: String;
begin
Args := ' openwith';
for I := 0 to FileList.Count - 1 do
@ -53,7 +53,7 @@ begin
Result:= ExecCmdFork(PythonExe + ' ' + PythonScript + Args);
end;
function FileTrash(const FileName: UTF8String): Boolean;
function FileTrash(const FileName: String): Boolean;
begin
Result:= fpSystemStatus('kioclient move ' + QuoteStr(FileName) + ' trash:/') = 0;
end;

View file

@ -54,7 +54,7 @@ type
private
FGKeyFile: PGKeyFile;
protected
function LoadFromFile(const AFileName: String; out AMessage: UTF8String): Boolean; inline;
function LoadFromFile(const AFileName: String; out AMessage: String): Boolean; inline;
public
constructor Create(const AFileName: String; AEscapeLineFeeds : Boolean = False); override;
destructor Destroy; override;
@ -73,14 +73,14 @@ uses
{ TKeyFile }
function TKeyFile.LoadFromFile(const AFileName: String; out AMessage: UTF8String): Boolean;
function TKeyFile.LoadFromFile(const AFileName: String; out AMessage: String): Boolean;
var
AChar: Pgchar;
ALength: gsize;
AContents: Pgchar;
AError: PGError = nil;
function FormatMessage: UTF8String;
function FormatMessage: String;
begin
if Assigned(AError) then
begin
@ -116,7 +116,7 @@ end;
constructor TKeyFile.Create(const AFileName: String; AEscapeLineFeeds: Boolean);
var
AMessage: UTF8String;
AMessage: String;
begin
FGKeyFile:= g_key_file_new();
if not LoadFromFile(AFileName, AMessage) then

View file

@ -96,7 +96,7 @@ begin
Raise Exception.Create(ExceptionMessage);
end;
function GetThumbnail(const aFileName: UTF8String; aSize: TSize): Graphics.TBitmap;
function GetThumbnail(const aFileName: String; aSize: TSize): Graphics.TBitmap;
var
Memory: PByte;
Wand: PMagickWand;

View file

@ -51,7 +51,7 @@ type
);
const
DesktopName: array[TDesktopEnvironment] of UTF8String = (
DesktopName: array[TDesktopEnvironment] of String = (
'Unknown',
'KDE',
'GNOME',
@ -186,22 +186,22 @@ function fpCloseDir(__dirp: pDir): cInt; inline;
function fpSystemStatus(Command: string): cint;
function GetDesktopEnvironment: TDesktopEnvironment;
function FileIsLinkToFolder(const FileName: UTF8String; out LinkTarget: UTF8String): Boolean;
function FileIsLinkToFolder(const FileName: String; out LinkTarget: String): Boolean;
{en
Checks if file is executable or script
@param(FileName File name)
@returns(The function returns @true if successful, @false otherwise)
}
function FileIsUnixExecutable(const Filename: UTF8String): Boolean;
function FileIsUnixExecutable(const Filename: String): Boolean;
{en
Find mount point of file system where file is located
@param(FileName File name)
@returns(Mount point of file system)
}
function FindMountPointPath(const FileName: UTF8String): UTF8String;
function ExecutableInSystemPath(const FileName: UTF8String): Boolean;
function GetDefaultAppCmd(const FileName: UTF8String): UTF8String;
function GetFileMimeType(const FileName: UTF8String): UTF8String;
function FindMountPointPath(const FileName: String): String;
function ExecutableInSystemPath(const FileName: String): Boolean;
function GetDefaultAppCmd(const FileName: String): String;
function GetFileMimeType(const FileName: String): String;
{en
Fix separators in case they are broken UTF-8 characters
(FPC takes only first byte as it doesn't support Unicode).
@ -351,7 +351,7 @@ begin
Exit(DE_XFCE);
end;
function FileIsLinkToFolder(const FileName: UTF8String; out LinkTarget: UTF8String): Boolean;
function FileIsLinkToFolder(const FileName: String; out LinkTarget: String): Boolean;
var
StatInfo: BaseUnix.Stat;
iniDesktop: TIniFileEx = nil;
@ -375,7 +375,7 @@ begin
end;
end;
function FileIsUnixExecutable(const FileName: UTF8String): Boolean;
function FileIsUnixExecutable(const FileName: String): Boolean;
var
Info : Stat;
dwSign : LongWord;
@ -399,10 +399,10 @@ begin
end;
end;
function FindMountPointPath(const FileName: UTF8String): UTF8String;
function FindMountPointPath(const FileName: String): String;
var
I, J: LongInt;
sTemp: UTF8String;
sTemp: String;
recStat: Stat;
st_dev: QWord;
begin
@ -441,7 +441,7 @@ begin
end;
end;
function ExecutableInSystemPath(const FileName: UTF8String): Boolean;
function ExecutableInSystemPath(const FileName: String): Boolean;
var
I: Integer;
Path: String;
@ -457,7 +457,7 @@ begin
Result:= False;
end;
function GetDefaultAppCmd(const FileName: UTF8String): UTF8String;
function GetDefaultAppCmd(const FileName: String): String;
{$IF NOT DEFINED(DARWIN)}
var
Filenames: TStringList;
@ -475,7 +475,7 @@ begin
end;
{$ENDIF}
function GetFileMimeType(const FileName: UTF8String): UTF8String;
function GetFileMimeType(const FileName: String): String;
{$IF NOT DEFINED(DARWIN)}
begin
Result:= uMimeType.GetFileMimeType(FileName);
@ -513,7 +513,7 @@ function MountDrive(Drive: PDrive): Boolean;
{$IFDEF LINUX}
var
Index: Integer;
MountPath: UTF8String;
MountPath: String;
{$ENDIF}
begin
if not Drive^.IsMounted then

View file

@ -81,10 +81,10 @@ procedure Py_XDECREF(op: PPyObject);
function PyStringToString(S: PPyObject): String;
procedure PythonAddModulePath(const Path: UTF8String);
function PythonLoadModule(const ModuleName: UTF8String): PPyObject;
function PythonRunFunction(Module: PPyObject; const FunctionName, FunctionArg: UTF8String): PPyObject; overload;
function PythonRunFunction(Module: PPyObject; const FunctionName: UTF8String; FileList: TStrings): PPyObject; overload;
procedure PythonAddModulePath(const Path: String);
function PythonLoadModule(const ModuleName: String): PPyObject;
function PythonRunFunction(Module: PPyObject; const FunctionName, FunctionArg: String): PPyObject; overload;
function PythonRunFunction(Module: PPyObject; const FunctionName: String; FileList: TStrings): PPyObject; overload;
var
PythonExe: String;
@ -144,13 +144,13 @@ begin
end;
end;
procedure PythonAddModulePath(const Path: UTF8String);
procedure PythonAddModulePath(const Path: String);
begin
PyRun_SimpleString('import sys');
PyRun_SimpleString(PAnsiChar('sys.path.append("' + Path + '")'));
end;
function PythonLoadModule(const ModuleName: UTF8String): PPyObject;
function PythonLoadModule(const ModuleName: String): PPyObject;
var
pyName: PPyObject;
begin
@ -159,7 +159,7 @@ begin
Py_DECREF(pyName);
end;
function PythonCallFunction(Module: PPyObject; const FunctionName: UTF8String; FunctionArg: PPyObject): PPyObject; overload;
function PythonCallFunction(Module: PPyObject; const FunctionName: String; FunctionArg: PPyObject): PPyObject; overload;
var
pyFunc, pyArgs: PPyObject;
begin
@ -179,7 +179,7 @@ begin
end;
end;
function PythonRunFunction(Module: PPyObject; const FunctionName, FunctionArg: UTF8String): PPyObject;
function PythonRunFunction(Module: PPyObject; const FunctionName, FunctionArg: String): PPyObject;
var
pyArgs: PPyObject;
begin
@ -187,7 +187,7 @@ begin
Result:= PythonCallFunction(Module, FunctionName, pyArgs);
end;
function PythonRunFunction(Module: PPyObject; const FunctionName: UTF8String; FileList: TStrings): PPyObject;
function PythonRunFunction(Module: PPyObject; const FunctionName: String; FileList: TStrings): PPyObject;
var
pyArgs: PPyObject;
begin

Some files were not shown because too many files have changed in this diff Show more