Unit 'FileUtil' Package
[Overview][Constants][Types][Classes][Procedures and functions][Index] [#lazutils]

Reference for unit 'FileUtil'

Miscellaneous routines, types, and classes for manipulating files, file names, and paths.

uses

  System,

  Classes,

  sysutils,

  StrUtils,

  Masks,

  

Contains classes for matching file names to file masks.

  LazUTF8,

  

Number of characters (codepoints) to get from the string.

  LazFileUtils,

  

Contains types, procedures, and functions used for file and directory operations.

  Contnrs;

Overview

fileutils.pas contains routines, types, and classes used to maintain compatibility with the FileUtil unit in Delphi. File routines that deal with UTF-8 file names are located in the LazFileUtils unit.

File name handling in the unit is platform- or OS-specific. For the Windows, Darwin (macOS), and Amiga platforms, file names are NOT case sensitive. In addition, under Darwin, the NotLiteralFilenames define is enabled. This indicates that file names cannot be compared using the = string operator.

This unit contains basic functions similar to those in the RTL, but use UTF-8 instead of the default system encoding. Please note that AnsiToUTF8 and UTF8ToAnsi need a widestring manager under Linux, BSD, and macOS. Normally these operating systems use UTF-8 as the system encoding so the WideStringManager is not needed.

fileutil.pas is part of the LazUtils package.