64. FileUtils

Module for getting information about files and directories. Their types and sizes. Flags: Stable

64.1. Summary of Module Globals

List of Global Functions

  • Exists - Function which determines if the requested file/directory exists.

  • GetFileRealType - Function returns the real type of requested file/directory. If the file is a link to any object, "link" is returned.

  • GetFileType - Function returns the type of requested file/directory. If the file is a link to any object, the object's type is returned.

  • GetOwnerGroupID - Function which determines the owner's group ID of requested file/directory.

  • GetOwnerUserID - Function which determines the owner's user ID of requested file/directory.

  • GetSize - Function which returns the size of requested file/directory.

  • IsBlock - Function which determines if the requested file/directory is a block file (device) or link to a block device.

  • IsCharacterDevice - Function which determines if the requested file/directory is a character device or link to a character device.

  • IsDirectory - Function which determines if the requested file/directory is a directory or it is a link to a directory.

  • IsFifo - Function which determines if the requested file/directory is a fifo or link to a fifo.

  • IsFile - Function which determines if the requested file/directory is a regular file or it is a link to a regular file.

  • IsLink - Function which determines if the requested file/directory is a link.

  • IsSocket - Function which determines if the requested file/directory is a socket or link to a socket.

List of Global Variables

    64.2. Global Functions

    64.2.1. Exists

    Function which determines if the requested file/directory exists.

    Function parameters

    • string target

    Return value

    • boolean - true if exists

    64.2.2. GetFileRealType

    Function returns the real type of requested file/directory. If the file is a link to any object, "link" is returned.

    Function parameters

    • string target

    Return value

    • string - fle type (directory|regular|block|fifo|link|socket|chr_device), nil if doesn't exist

    64.2.3. GetFileType

    Function returns the type of requested file/directory. If the file is a link to any object, the object's type is returned.

    Function parameters

    • string target

    Return value

    • string - fle type (directory|regular|block|fifo|link|socket|chr_device), nil if doesn't exist

    64.2.4. GetOwnerGroupID

    Function which determines the owner's group ID of requested file/directory.

    Function parameters

    • string target

    Return value

    • integer - GID, nil if doesn't exist

    64.2.5. GetOwnerUserID

    Function which determines the owner's user ID of requested file/directory.

    Function parameters

    • string target

    Return value

    • integer - UID, nil if doesn't exist

    64.2.6. GetSize

    Function which returns the size of requested file/directory.

    Function parameters

    • string target

    Return value

    • integer - file size, -1 if doesn't exist

    64.2.7. IsBlock

    Function which determines if the requested file/directory is a block file (device) or link to a block device.

    Function parameters

    • string target

    Return value

    • boolean - true if it is a block file, nil if doesn't exist

    64.2.8. IsCharacterDevice

    Function which determines if the requested file/directory is a character device or link to a character device.

    Function parameters

    • string target

    Return value

    • boolean - true if it is a charcater device, nil if doesn't exist

    64.2.9. IsDirectory

    Function which determines if the requested file/directory is a directory or it is a link to a directory.

    Function parameters

    • string target

    Return value

    • boolean - true if it is a directory, nil if doesn't exist

    64.2.10. IsFifo

    Function which determines if the requested file/directory is a fifo or link to a fifo.

    Function parameters

    • string target

    Return value

    • boolean - true if it is a fifo, nil if doesn't exist

    64.2.11. IsFile

    Function which determines if the requested file/directory is a regular file or it is a link to a regular file.

    Function parameters

    • string target

    Return value

    • boolean - true if it is a regular file, nil if doesn't exist

    64.2.12. IsLink

    Function which determines if the requested file/directory is a link.

    Function parameters

    • string target

    Return value

    • boolean - true if it is a link, nil if doesn't exist

    64.2.13. IsSocket

    Function which determines if the requested file/directory is a socket or link to a socket.

    Function parameters

    • string target

    Return value

    • boolean - true if it is a socket, nil if doesn't exist

    64.3. Global Variables

    64.4. Module Requirements

    64.4.1. Module Imports

    • SCR

    64.4.2. Module Includes