GeFile 函数

详细描述

Groups

  GE_FCOPY
  GE_FILE_ATTRIBUTE
  GE_FKILL

函数

Bool   GeFExist (const Filename &name, Bool isdir=false)
Bool   GeSearchFile (const Filename &directory, const Filename &name, Filename *found)
Bool   GeFKill (const Filename &name, Int32 flags=0)
Bool   GeFCopyFile (const Filename &source, const Filename &dest, Int32 flags)
Bool   GeFRename (const Filename &source, const Filename &dest)
Bool   GeFMove (const Filename &source, const Filename &dest)
Bool   GeFCreateDir (const Filename &name)
Bool   GeFCreateDirRec (const Filename &name)
Bool   GeFGetDiskFreeSpace (const Filename &vol, UInt64 &freecaller, UInt64 &total, UInt64 &freespace)
UInt32   GeFGetAttributes (const Filename &name)
Bool   GeFSetAttributes (const Filename &name, UInt32 flags, UInt32 mask=( UInt32 ) - 1)

Function Documentation

◆  GeFExist()

Bool GeFExist ( const Filename name ,
Bool   isdir = false  
)

Checks if a file or directory exists.

参数
[in] name The name of the file or directory to check for.
[in] isdir true if checking a directory.
返回
true if the file or directory exists, otherwise false .

◆  GeSearchFile()

Bool GeSearchFile ( const Filename directory ,
const Filename name ,
Filename found  
)

Recursively searches for a file in a given directory.

参数
[in] directory The directory to search for the file.
[in] name The name of the file to find.
[out] found A pointer to a Filename to take the filename of the actual file found. The caller owns the pointed filename.
返回
true if the file was found, otherwise false .

◆  GeFKill()

Bool GeFKill ( const Filename name ,
Int32   flags = 0  
)

Deletes a file or directory.

参数
[in] name The name of the file or directory to delete.
[in] flags The delete flags: GE_FKILL
返回
true if the file or directory was deleted, otherwise false .

◆  GeFCopyFile()

Bool GeFCopyFile ( const Filename source ,
const Filename dest ,
Int32   flags  
)

Copies a file.

参数
[in] source The name of the file to copy.
[in] dest The name of the file to create from the source file.
[in] flags The copy flags: GE_FCOPY
返回
true if the file was copied, otherwise false .

◆  GeFRename()

Bool GeFRename ( const Filename source ,
const Filename dest  
)

Renames a file.

警告
Files can only be renamed on the same directory level, i.e. they cannot be moved through this function.
参数
[in] source The name of the file to rename.
[in] dest The new name of the file.
返回
true if the file was renamed, otherwise false .

◆  GeFMove()

Bool GeFMove ( const Filename source ,
const Filename dest  
)

Moves a file.

参数
[in] source The source path.
[in] dest The destination path.
返回
true if the file was moved, otherwise false .

◆  GeFCreateDir()

Bool GeFCreateDir ( const Filename name )

Creates a directory.

警告
Only one directory level is created. If more than one directory in the path specified by name does not exist then this function will fail to create them.
另请参阅
GeFCreateDirRec()
参数
[in] name The name of the directory to create.
返回
true if the directory was created, otherwise false .

◆  GeFCreateDirRec()

Bool GeFCreateDirRec ( const Filename name )

Creates a directory even if the directories in the path do not exist.

参数
[in] name The name of the directory to create.
返回
true if the directory was created, otherwise false .

◆  GeFGetDiskFreeSpace()

Bool GeFGetDiskFreeSpace ( const Filename vol ,
UInt64 freecaller ,
UInt64 total ,
UInt64 freespace  
)

Retrieves information about the amount of space that is available on a disk volume.

参数
[in] vol The name of the disk volume.
[out] freecaller Assigned the number of bytes on the volume available to the calling application.
[out] total Assigned the total number of bytes on a disk.
[out] freespace Assigned the number of bytes of free space on the volume.
返回
true if disk free space information was retrieved, otherwise false .

◆  GeFGetAttributes()

UInt32 GeFGetAttributes ( const Filename name )

Gets the attributes of a file.

参数
[in] name The file name.
返回
The attribute flags: GE_FILE_ATTRIBUTE

◆  GeFSetAttributes()

Bool GeFSetAttributes ( const Filename name ,
UInt32   flags ,
UInt32   mask = (UInt32) - 1  
)

Sets the attributes for a file.

参数
[in] name The file name.
[in] flags The attribute flags: GE_FILE_ATTRIBUTE
[in] mask An attribute mask to protect already set flags: GE_FILE_ATTRIBUTE
返回
true if the attributes could be set, otherwise false .