jcf: removed FileUtils unit from package in the past it has been replaced with JcfFileUtils, fixes issue #14863

git-svn-id: trunk@22263 -
This commit is contained in:
vincents 2009-10-22 19:59:03 +00:00
parent b3fc61266c
commit ba1b2f95f1
4 changed files with 18 additions and 111 deletions

1
.gitattributes vendored
View File

@ -1144,7 +1144,6 @@ components/jcf2/Utils/Delay.pas svneol=native#text/pascal
components/jcf2/Utils/DragDrop/JCFDropTarget.pas svneol=native#text/pascal
components/jcf2/Utils/DragDrop/frDrop.dfm svneol=native#text/plain
components/jcf2/Utils/DragDrop/frDrop.pas svneol=native#text/pascal
components/jcf2/Utils/FileUtils.pas svneol=native#text/pascal
components/jcf2/Utils/IntList.pas svneol=native#text/pascal
components/jcf2/Utils/JcfFileUtils.pas svneol=native#text/pascal
components/jcf2/Utils/JcfFontSetFunctions.pas svneol=native#text/pascal

View File

@ -22,7 +22,7 @@
</CompilerOptions>
<Description Value="JEDI Code Format IDE Plugin for Lazarus"/>
<Version Major="2"/>
<Files Count="123">
<Files Count="122">
<Item1>
<Filename Value="jcfidemain.pas"/>
<UnitName Value="JcfIdeMain"/>
@ -481,41 +481,37 @@
<UnitName Value="Delay"/>
</Item114>
<Item115>
<Filename Value="..\..\Utils\FileUtils.pas"/>
<UnitName Value="FileUtils"/>
</Item115>
<Item116>
<Filename Value="..\..\Utils\IntList.pas"/>
<UnitName Value="IntList"/>
</Item116>
<Item117>
</Item115>
<Item116>
<Filename Value="..\..\Utils\JcfFontSetFunctions.pas"/>
<UnitName Value="JcfFontSetFunctions"/>
</Item117>
<Item118>
</Item116>
<Item117>
<Filename Value="..\..\Utils\JcfHelp.pas"/>
<UnitName Value="JcfHelp"/>
</Item118>
<Item119>
</Item117>
<Item118>
<Filename Value="..\..\Utils\JcfLog.pas"/>
<UnitName Value="JcfLog"/>
</Item119>
<Item120>
</Item118>
<Item119>
<Filename Value="..\..\Utils\JcfMiscFunctions.pas"/>
<UnitName Value="JcfMiscFunctions"/>
</Item120>
<Item121>
</Item119>
<Item120>
<Filename Value="..\..\Ui\fAbout.lfm"/>
<Type Value="LFM"/>
</Item121>
<Item122>
</Item120>
<Item121>
<Filename Value="..\..\Ui\fAbout.pas"/>
<UnitName Value="fAbout"/>
</Item122>
<Item123>
</Item121>
<Item122>
<Filename Value="..\..\JcfVersionConsts.pas"/>
<UnitName Value="JcfVersionConsts"/>
</Item123>
</Item122>
</Files>
<Type Value="RunAndDesignTime"/>
<RequiredPkgs Count="2">

View File

@ -7,7 +7,7 @@ unit jcfidelazarus;
interface
uses
JcfIdeMain, JcfIdeRegister, AsmKeywords, BuildParseTree, BuildTokenList,
JcfIdeMain, JcfIdeRegister, AsmKeywords, BuildParseTree, BuildTokenList,
ParseError, ParseTreeNode, ParseTreeNodeType, PreProcessorExpressionParser,
PreProcessorExpressionTokenise, PreProcessorExpressionTokens,
PreProcessorParseTree, SourceToken, SourceTokenList, Tokens, TokenUtils,
@ -32,7 +32,7 @@ uses
JcfRegistrySettings, JcfSetBase, JcfSettings, SetAlign, SetAsm, SetCaps,
SetClarify, SetComments, SetIndent, SetObfuscate, SetPreProcessor,
SetReplace, SetReturns, SetSpaces, SettingsTypes, SetTransform, SetUses,
SetWordList, SettingsStream, fJcfErrorDisplay, Delay, fileutils, IntList,
SetWordList, SettingsStream, fJcfErrorDisplay, Delay, IntList,
JcfFontSetFunctions, JcfHelp, JcfLog, JcfMiscFunctions, fAbout,
JcfVersionConsts, LazarusPackageIntf;

View File

@ -1,88 +0,0 @@
unit FileUtils;
{(*}
(*------------------------------------------------------------------------------
Delphi Code formatter source code
The Original Code is FileUtils.pas, released October 2001.
The Initial Developer of the Original Code is Anthony Steele.
Portions created by Anthony Steele are Copyright (C) 1999-2008 Anthony Steele.
All Rights Reserved.
Contributor(s): Anthony Steele.
The contents of this file are subject to the Mozilla Public License Version 1.1
(the "License"). you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.mozilla.org/NPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied.
See the License for the specific language governing rights and limitations
under the License.
Alternatively, the contents of this file may be used under the terms of
the GNU General Public License Version 2 or later (the "GPL")
See http://www.gnu.org/licenses/gpl.html
------------------------------------------------------------------------------*)
{*)}
{$I JcfGlobal.inc}
interface
{ this unit is a wrapper for platform-specific file fns
IE a way to get rid of those portability warnings
and a place to put the equivalent linux fns }
{$IFDEF FPC}
uses Dialogs;
{$ELSE}
{$IFDEF WIN32}
uses {$WARNINGS OFF} FileCtrl {$WARNINGS ON};
{$ENDIF}
{$ENDIF}
function FileIsReadOnly(const ps: string): boolean;
implementation
uses SysUtils;
{$IFDEF FPC}
// FPC version
function FileIsReadOnly(const ps: string): boolean;
var
liAttr: integer;
begin
Assert(FileExists(ps));
{$WARNINGS OFF}
liAttr := FileGetAttr(ps);
Result := ((liAttr and faReadOnly) <> 0);
{$WARNINGS ON}
end;
{$ELSE}
{$IFDEF WIN32}
// delphi-windows version
function FileIsReadOnly(const ps: string): boolean;
var
liAttr: integer;
begin
Assert(FileExists(ps));
{$WARNINGS OFF}
liAttr := FileGetAttr(ps);
Result := ((liAttr and faReadOnly) <> 0);
{$WARNINGS ON}
end;
{$ENDIF}
{$IFDEF LINUX}
// delphi-linux version
This bit will not compile under linux yet
as the above win32 fns will not work there.
{$ENDIF}
{$ENDIF}
end.