IoTools

class IoTools

Bases: pybind11_object

File and directories basic tools.

The example below shows how to manipulate the functions of this class to create first a directory which name corresponds to the user name and then create a file in this directory.

#include <fstream>
#include <iostream>
#include <string>
#include <visp3/core/vpIoTools.h>

int main()
{
  std::string username;
  vpIoTools::getUserName(username);

  // Test if a username directory exist. If no try to create it
  if (vpIoTools::checkDirectory(username) == false) {
    try {
      // Create a directory with name "username"
      vpIoTools::makeDirectory(username);
    }
    catch (...) {
      std::cout << "Cannot create " << username << " directory" << std::endl;
      return EXIT_FAILURE;
    }
  }
  // Create a empty filename with name "username/file.txt"
  std::ofstream f;
  std::string filename = username + "/file.txt";
  // Under Windows converts the filename string into "username\\file.txt"
  filename = vpIoTools::path(filename);
  std::cout << "Create: " << filename << std::endl;
  f.open(filename.c_str());
  f.close();

  // Rename the file
  std::string newfilename = username + "/newfile.txt";
  std::cout << "Rename: " << filename << " in: " << newfilename << std::endl;
  if (vpIoTools::rename(filename, newfilename) == false)
    std::cout << "Unable to rename: " << filename << std::endl;

  // Remove the file
  std::cout << "Remove: " << newfilename << std::endl;
  if (vpIoTools::remove(newfilename) == false)
    std::cout << "Unable to remove: " << newfilename << std::endl;

  return EXIT_SUCCESS;
}

The example below shows how to read a configuration file and how to create a name for experiment files. We assume the following file “/home/user/demo/config.txt” :

expNumber 2
save 0
lambda 0.4
use2D 0
use3D 1
#include <iostream>
#include <string>
#include <visp3/core/vpIoTools.h>

int main()
{
  // reading configuration file
  vpIoTools::loadConfigFile("/home/user/demo/config.txt");
  std::string nExp;vpIoTools::readConfigVar("expNumber", nExp); // nExp <- "2"
  double lambda;vpIoTools::readConfigVar("lambda", lambda);     // lambda <- 0.4
  bool use2D;vpIoTools::readConfigVar("use2D", use2D);          // use2D <- false
  bool use3D;vpIoTools::readConfigVar("use3D", use3D);          // use3D <- true
  bool doSave;vpIoTools::readConfigVar("save", doSave);         //  doSave <- false

  // creating name for experiment files
  vpIoTools::setBaseDir("/home/user/data");
  // full name <- "/home/user/data/exp2"
  vpIoTools::setBaseName("exp" + nExp);
  // full name <- "/home/user/data/exp2" since use2D==false
  vpIoTools::addNameElement("2D", use2D);
  // full name <- "/home/user/data/exp2_3D"
  vpIoTools::addNameElement("3D", use3D);
  // full name <- "/home/user/data/exp2_3D_lambda0.4"
  vpIoTools::addNameElement("lambda", lambda);

  // Saving file.Would copy "/home/user/demo/config.txt" to
  // "/home/user/data/exp2_3D_lambda0.4_config.txt" if doSave was true
  vpIoTools::saveConfigFile(doSave);
  // create sub directory
  vpIoTools::createBaseNamePath();  // creates "/home/user/data/exp2_3D_lambda0.4/"
}

Methods

__init__

addNameElement

Overloaded function.

checkDirectory

Check if a directory exists.

checkFifo

Check if a fifo file exists.

checkFilename

Check if a file exists.

copy

Copy a src file or directory in dst .

createBaseNamePath

Creates the directory baseDir/baseName .

createFilePath

Return the file path that corresponds to the concatenated parent and child string files by adding the corresponding separator for unix or windows.

getAbsolutePathname

return:

According to realpath() manual, returns an absolute pathname that names the same file, whose resolution does not involve '.', '..', or symbolic links for Unix systems. According to GetFullPathName() documentation, retrieves the full path of the specified file for Windows systems.

getBaseName

Gets the base name (prefix) of the experiment files.

getBuildInformation

Return build informations (OS, compiler, build flags, used 3rd parties...).

getDirFiles

return:

A vector of files' names in that directory

getFileExtension

Returns the extension of the file or an empty string if the file has no extension.

getFullName

Gets the full path of the experiment files : baseDir/baseName

getIndex

Checks file name format and extracts its index.

getName

return:

The name of the file or directory denoted by this pathname, or an empty string if this pathname's name sequence is empty.

getNameWE

return:

The name of the file without extension or directory denoted by this pathname, or an empty string if this pathname's name sequence is empty.

getParent

Returns the pathname string of this pathname's parent.

getTempPath

Return path to the default temporary folder:

getUserName

Overloaded function.

getVersion

Extract major, minor and patch from a version given as "x.x.x".

getViSPImagesDataPath

Get ViSP images data path.

getenv

Get the content of an environment variable.

isAbsolutePathname

Return whether a path is absolute.

isSamePathname

Return true if the two pathnames are identical.

loadConfigFile

Reads the configuration file and parses it.

makeDirectory

Create a new directory.

makeFifo

Create a new FIFO file.

makeTempDirectory

Create a new temporary directory with a unique name based on dirname parameter.

parseBoolean

path

Converts a path name to the current system's format.

readConfigVar

Overloaded function.

readConfigVarBoolean

Tries to read the parameter named var as a bool .

readConfigVarDouble

Tries to read the parameter named var as a double .

readConfigVarFloat

Tries to read the parameter named var as a float .

readConfigVarInt

Tries to read the parameter named var as a int .

readConfigVarString

Tries to read the parameter named var as a std::string .

readConfigVarUnsigned

Tries to read the parameter named var as a unsigned int.

remove

Remove a file or a directory.

rename

Rename an existing file oldfilename in newfilename .

saveConfigFile

Copy the initial configuration file to the experiment directory.

setBaseDir

Sets the base directory of the experiment files.

setBaseName

Sets the base name (prefix) of the experiment files.

splitChain

The following code shows how to use this function:

splitDrive

return:

a pair whose the first element is the drive specification and the second element the path specification

toLowerCase

Return a lower-case version of the string input .

toUpperCase

Return a upper-case version of the string input .

trim

Remove leading and trailing whitespaces from a string.

writeBinaryValueLE

Overloaded function.

Inherited Methods

Operators

__doc__

__init__

__module__

Attributes

__annotations__

__init__(*args, **kwargs)
static addNameElement(*args, **kwargs)

Overloaded function.

  1. addNameElement(strTrue: str, cond: bool = true, strFalse: str = ) -> None

Augments the prefix of the experiment files by strTrue if cond is verified, and by strFalse otherwise.

Parameters:
strTrue

String to add if cond is true

cond

Condition managing the file name

strFalse

String to add if cond is false (default “”)

  1. addNameElement(strTrue: str, val: float) -> None

Augments the prefix of the experiment files by strTrue followed by val .

Parameters:
strTrue

String to add

val

Value to add

static checkDirectory(dirname: str) bool

Check if a directory exists.

Parameters:
dirname: str

Directory to test if it exists. The directory name is converted to the current system’s format; see path() .

Returns:

true : If the directory exists and is accessible with write access.false : If dirname string is null, or is not a directory, or has no write access.

static checkFifo(filename: str) bool

Check if a fifo file exists.

Note

See checkFilename(const std::string &)

Returns:

true : If the fifo file exists and is accessible with read access.false : If fifofilename string is null, or is not a fifo filename, or has no read access.

static checkFilename(filename: str) bool

Check if a file exists.

Parameters:
filename: str

Filename to test if it exists.

Returns:

true : If the filename exists and is accessible with read access.false : If filename string is null, or is not a filename, or has no read access.

static copy(src: str, dst: str) bool

Copy a src file or directory in dst .

Parameters:
src: str

Existing file or directory to copy.

dst: str

New copied file or directory.

static createBaseNamePath(empty: bool = false) None

Creates the directory baseDir/baseName . If already exists, empties it if empty is true. Useful to save the images corresponding to a particular experiment.

Parameters:
empty: bool = false

Indicates if the new directory has to be emptied

static createFilePath(parent: str, child: str) str

Return the file path that corresponds to the concatenated parent and child string files by adding the corresponding separator for unix or windows.

The corresponding path is also converted. Under windows, all the “/” characters are converted into “\” characters. Under Unix systems all the “\” characters are converted into “/” characters.

static getAbsolutePathname(pathname: str) str
Returns:

According to realpath() manual, returns an absolute pathname that names the same file, whose resolution does not involve ‘.’, ‘..’, or symbolic links for Unix systems. According to GetFullPathName() documentation, retrieves the full path of the specified file for Windows systems.

static getBaseName() str

Gets the base name (prefix) of the experiment files.

Returns:

the base name of the experiment files.

static getBuildInformation() str

Return build informations (OS, compiler, build flags, used 3rd parties…).

static getDirFiles(dirname: str) list[str]
Returns:

A vector of files’ names in that directory

static getFileExtension(pathname: str, checkFile: bool = false) str

Returns the extension of the file or an empty string if the file has no extension. If checkFile flag is set, it will check first if the pathname denotes a directory and so return an empty string and second it will check if the file denoted by the pathanme exists. If so, it will return the extension if present.

The following code shows how to use this function:

#include <visp3/core/vpIoTools.h>

int main()
{
  std::string filename = "my/path/to/file.xml"
  std::string ext = vpIoTools::getFileExtension(opt_learning_data);
  std::cout << "ext: " << ext << std::endl;
}

It produces the following output:

ext: .xml
Parameters:
pathname: str

The pathname of the file we want to get the extension.

checkFile: bool = false

If true, the file must exist otherwise an empty string will be returned.

Returns:

The extension of the file including the dot “.” or an empty string if the file has no extension or if the pathname is empty.

static getFullName() str

Gets the full path of the experiment files : baseDir/baseName

Returns:

the full path of the experiment files.

static getIndex(filename: str, format: str) int

Checks file name format and extracts its index.

Format must contain substring “%0xd”, defining the length of image index. For example, format can be “img%04d.jpg”. Then “img0001.jpg” and “img0000.jpg” satisfy it, while “picture001.jpg” and “img001.jpg” don’t.

The following sample code shows how to use this function:

#include <visp3/core/vpIoTools.h>

int main()
{
  std::cout << vpIoTools::getIndex("file-1.txt", "file-%d.txt") << std::endl;
  std::cout << vpIoTools::getIndex("/tmp/file0040.txt", "/tmp/file%04d.txt") << std::endl;
  std::cout << vpIoTools::getIndex("file.txt", "file%d.txt") << std::endl;
  std::cout << vpIoTools::getIndex("file03.txt", "file%02d.txt") << std::endl;
  std::cout << vpIoTools::getIndex("file-03.txt", "file%02d.txt") << std::endl;
}

It produces the following output:

1
40
-1
3
-1
Parameters:
filename: str

Name from which to extract the index.

format: str

Format of the filename.

Returns:

Extracted index on success, -1 otherwise.

static getName(pathname: str) str
Returns:

The name of the file or directory denoted by this pathname, or an empty string if this pathname’s name sequence is empty.

static getNameWE(pathname: str) str
Returns:

The name of the file without extension or directory denoted by this pathname, or an empty string if this pathname’s name sequence is empty.

static getParent(pathname: str) str

Returns the pathname string of this pathname’s parent.

For example

  • when pathname is set to “./executable” it returns “.”

  • When pathname is set to “folder/executable” it returns “folder”

  • When pathname is set to “foldersubfolderfile.cpp” it returns “foldersubfolder”

  • When pathname is set to “executable” it returns “.”

Parameters:
pathname: str

Pathname from which parent name is extracted using vpIoTools::separator . When the separator is not found, it returns “.” as the current parent folder.

Returns:

The parent of the pathname , or an empty string if the pathname is empty.

static getTempPath() str

Return path to the default temporary folder:

  • on Windows it returns GetTempPath()

  • on Unix it returns /tmp/<username>

Warning

This function is not implemented on WINRT.

The following sample shows how to use this function to create unique temporary directories:

include <visp3/core/vpIoTools.h>

int main()
{
  std::string tmp_path = vpIoTools::getTempPath();
  std::cout << "Temp path: " << tmp_path << std::endl;

  std::string tmp_dir1 = vpIoTools::makeTempDirectory(tmp_path);
  std::cout << "Created unique temp dir1: " << tmp_dir1 << std::endl;

  std::string tmp_dir2_template = tmp_path + vpIoTools::path("/") + "dir_XXXXXX";
  std::string tmp_dir2 = vpIoTools::makeTempDirectory(tmp_dir2_template);
  std::cout << "Created unique temp dir2: " << tmp_dir2 << std::endl;

  if (vpIoTools::remove(tmp_dir1)) {
    std::cout << "Temp dir1 was deleted" << std::endl;
  }
  if (vpIoTools::remove(tmp_dir2)) {
    std::cout << "Temp dir2 was deleted" << std::endl;
  }
}

On Windows it produces:

Temp path: C:\Users\<username>\AppData\Local\Temp
Created unique temp dir1: C:\Users\<username>\AppData\Local\Temp\ddaac8c3-7a95-447f-8a1c-fe31bb2426f9
Created unique temp dir2: C:\Users\<username>\AppData\Local\Temp\dir\_8b9e6e9a-fe9b-4b44-8382-fc2368dfed68
Temp dir1 was deleted
Temp dir2 was deleted

while on Unix it produces:

Temp path: /tmp/<username>
Created unique temp dir1: /tmp/<username>/AMIsXF
Created unique temp dir2: /tmp/<username>/dir\_KP7119
Temp dir1 was deleted
Temp dir2 was deleted

Note

See makeTempDirectory() , remove()

static getUserName(*args, **kwargs)

Overloaded function.

  1. getUserName() -> str

Get the user name.

  • Under unix, get the content of the LOGNAME environment variable. For most purposes (especially in conjunction with crontab), it is more useful to use the environment variable LOGNAME to find out who the user is, rather than the getlogin() function. This is more flexible precisely because the user can set LOGNAME arbitrarily.

  • Under windows, uses the GetUserName() function.

Returns:

A tuple containing:

  • username: The user name. When the username cannot be retrieved, set username to “unknown” string.

  1. getUserName() -> str

Get the user name.

  • Under unix, get the content of the LOGNAME environment variable. For most purposes (especially in conjunction with crontab), it is more useful to use the environment variable LOGNAME to find out who the user is, rather than the getlogin() function. This is more flexible precisely because the user can set LOGNAME arbitrarily.

  • Under windows, uses the GetUserName() function.

Note

See getUserName(std::string &)

Returns:

The user name.

static getVersion(version: str) tuple[int, int, int]

Extract major, minor and patch from a version given as “x.x.x”. Ex: If version is “1.2.1”, major will be 1, minor 2 and patch 1.

Parameters:
version: str

String to extract the values.

Returns:

A tuple containing:

  • major: Extracted major.

  • minor: Extracted minor.

  • patch: Extracted patch.

static getViSPImagesDataPath() str

Get ViSP images data path. ViSP images data can be installed from Debian or Ubuntu visp-images-data package. It can be also installed from visp-images-3.x.y.zip that can be found on https://visp.inria.fr/download page.

This function returns the path to the folder that contains the data.

  • It checks first if VISP_INPUT_IMAGE_PATH environment variable that gives the location of the data is set. In that case returns the content of this environment var.

  • Otherwise it checks if visp-images-data binary package (Ubuntu, Debian) is installed. In that case returns then /usr/share/visp-images-data” .

  • If the path is not found, returns an empty string.

static getenv(env: str) str

Get the content of an environment variable.

#include <iostream>
#include <string>
#include <visp3/core/vpIoTools.h>

int main()
{
  std::string envvalue;
  try {
    std::string env = "HOME";
    envvalue = vpIoTools::getenv(env);
    std::cout << "$HOME = \"" << envvalue << "\"" << std::endl;
  }
  catch (const vpException &e) {
    std::cout << e.getMessage() << std::endl;
    return -1;
  }
  return 0;
}
Parameters:
env: str

Environment variable name (HOME, LOGNAME…).

Returns:

Value of the environment variable

static isAbsolutePathname(pathname: str) bool

Return whether a path is absolute.

Returns:

true if the pathname is absolute, false otherwise.

static isSamePathname(pathname1: str, pathname2: str) bool

Return true if the two pathnames are identical.

Note

It uses path() to normalize the path and getAbsolutePathname() to get the absolute pathname.

Returns:

true if the two pathnames are identical, false otherwise.

static loadConfigFile(confFile: str) bool

Reads the configuration file and parses it.

Parameters:
confFile: str

path to the file containing the configuration parameters to parse.

Returns:

true if succeed, false otherwise.

static makeDirectory(dirname: str) None

Create a new directory. It will create recursively the parent directories if needed.

Note

See makeTempDirectory() , remove()

Parameters:
dirname: str

Directory to create. The directory name is converted to the current system’s format; see path() .

static makeFifo(dirname: str) None

Create a new FIFO file. A FIFO file is a special file, similar to a pipe, but actually existing on the hard drive. It can be used to communicate data between multiple processes.

Warning

This function is only implemented on unix-like OS.

static makeTempDirectory(dirname: str) str

Create a new temporary directory with a unique name based on dirname parameter.

The following sample shows how to use this function to create unique temporary directories:

include <visp3/core/vpIoTools.h>

int main()
{
  std::string tmp_path = vpIoTools::getTempPath();
  std::cout << "Temp path: " << tmp_path << std::endl;

  std::string tmp_dir1 = vpIoTools::makeTempDirectory(tmp_path);
  std::cout << "Created unique temp dir1: " << tmp_dir1 << std::endl;

  std::string tmp_dir2_template = tmp_path + vpIoTools::path("/") + "dir_XXXXXX";
  std::string tmp_dir2 = vpIoTools::makeTempDirectory(tmp_dir2_template);
  std::cout << "Created unique temp dir2: " << tmp_dir2 << std::endl;

  if (vpIoTools::remove(tmp_dir1)) {
    std::cout << "Temp dir1 was deleted" << std::endl;
  }
  if (vpIoTools::remove(tmp_dir2)) {
    std::cout << "Temp dir2 was deleted" << std::endl;
  }
}

On Windows it produces:

Temp path: C:\Users\<username>\AppData\Local\Temp
Created unique temp dir1: C:\Users\<username>\AppData\Local\Temp\ddaac8c3-7a95-447f-8a1c-fe31bb2426f9
Created unique temp dir2: C:\Users\<username>\AppData\Local\Temp\dir\_8b9e6e9a-fe9b-4b44-8382-fc2368dfed68
Temp dir1 was deleted
Temp dir2 was deleted

while on Unix it produces:

Temp path: /tmp/<username>
Created unique temp dir1: /tmp/<username>/AMIsXF
Created unique temp dir2: /tmp/<username>/dir\_KP7119
Temp dir1 was deleted
Temp dir2 was deleted

Note

See makeDirectory() , getTempPath() , remove()

Parameters:
dirname: str

Parent directory in which a temporary directory will be created or temporary directory that ends with “XXXXXX”, which will be converted into random characters in order to create a unique directory name.

Returns:

String corresponding to the absolute path to the generated directory name.

static parseBoolean(input: str) bool
static path(pathname: str) str

Converts a path name to the current system’s format.

Parameters:
pathname: str

Path name to convert. Under windows, converts all the “/” characters in the pathname string into “\” characters. Under Unix systems converts all the “\” characters in the pathname string into “/” characters.

Returns:

The converted path name.

static readConfigVar(*args, **kwargs)

Overloaded function.

  1. readConfigVar(var: str, value: visp._visp.core.Color) -> bool

Tries to read the parameter named var as a * vpColor * .

Parameters:
var

Name of the parameter in the configuration file.

value

Value to be read. See vpColor.cpp for the color number.

Returns:

true if the parameter could be read.

  1. readConfigVar(var: str, value: visp._visp.core.ArrayDouble2D, nCols: int = 0, nRows: int = 0) -> bool

Tries to read the parameter named var as a * vpMatrix * . If nCols and nRows are indicated, will resize the matrix. Otherwise, will try to read as many values as indicated by the dimension of value .

Parameters:
var

Name of the parameter in the configuration file.

value

Value to be read.

nCols

Column dimension if resized.

nRows

Row dimension if resized

Returns:

true if the parameter could be read.

static readConfigVarBoolean(var: str) tuple[bool, bool]

Tries to read the parameter named var as a bool .

Parameters:
var: str

Name of the parameter in the configuration file.

Returns:

A tuple containing:

  • true if the parameter could be read.

  • value: Value to be read.

static readConfigVarDouble(var: str) tuple[bool, float]

Tries to read the parameter named var as a double .

Parameters:
var: str

Name of the parameter in the configuration file.

Returns:

A tuple containing:

  • true if the parameter could be read.

  • value: Value to be read.

static readConfigVarFloat(var: str) tuple[bool, float]

Tries to read the parameter named var as a float .

Parameters:
var: str

Name of the parameter in the configuration file.

Returns:

A tuple containing:

  • true if the parameter could be read.

  • value: Value to be read.

static readConfigVarInt(var: str) tuple[bool, int]

Tries to read the parameter named var as a int .

Parameters:
var: str

Name of the parameter in the configuration file.

Returns:

A tuple containing:

  • true if the parameter could be read.

  • value: Value to be read.

static readConfigVarString(var: str) tuple[bool, str]

Tries to read the parameter named var as a std::string .

Parameters:
var: str

Name of the parameter in the configuration file.

Returns:

A tuple containing:

  • true if the parameter could be read.

  • value: Value to be read.

static readConfigVarUnsigned(var: str) tuple[bool, int]

Tries to read the parameter named var as a unsigned int.

Parameters:
var: str

Name of the parameter in the configuration file.

Returns:

A tuple containing:

  • true if the parameter could be read.

  • value: Value to be read.

static remove(filename: str) bool

Remove a file or a directory.

Note

See makeDirectory() , makeTempDirectory()

Returns:

true if the file or the directory was removed, false otherwise.

static rename(oldfilename: str, newfilename: str) bool

Rename an existing file oldfilename in newfilename .

Parameters:
oldfilename: str

File to rename.

newfilename: str

New file name.

Returns:

true if the file was renamed, false otherwise.

static saveConfigFile(actuallySave: bool = true) None

Copy the initial configuration file to the experiment directory.

Parameters:
actuallySave: bool = true

If false, do not copy the file.

static setBaseDir(dir: str) None

Sets the base directory of the experiment files.

Parameters:
dir: str

Directory where the data will be saved.

static setBaseName(s: str) None

Sets the base name (prefix) of the experiment files.

Parameters:
s: str

Prefix of the experiment files.

static splitChain(chain: str, sep: str) list[str]

The following code shows how to use this function:

#include <visp3/core/vpIoTools.h>

int main()
{
  {
    std::string chain("/home/user;/usr/local/include;/usr/include");
    std::string sep = ";";

    std::vector<std::string> subChain = vpIoTools::splitChain(chain, sep);
    std::cout << "Found the following subchains: " << std::endl;
    for (size_t i=0; i < subChain.size(); ++i)
      std::cout << subChain[i] << std::endl;
  }

  {
    std::string chain("This is an other example");
    std::string sep = " ";

    std::vector<std::string> subChain = vpIoTools::splitChain(chain, sep);
    std::cout << "Found the following subchains: " << std::endl;
    for (size_t i=0; i < subChain.size(); ++i)
      std::cout << subChain[i] << std::endl;
  }
}

It produces the following output:

Found the following subchains:
/home/user
/usr/local/include
/usr/include
Found the following subchains:
This
is
an
other
example
Parameters:
chain: str

Input chain to split.

sep: str

Character separator.

Returns:

A vector that contains all the subchains.

static splitDrive(pathname: str) tuple[str, str]
Returns:

a pair whose the first element is the drive specification and the second element the path specification

static toLowerCase(input: str) str

Return a lower-case version of the string input . Numbers and special characters stay the same.

Parameters:
input: str

The input string for which we want to ensure that all the characters are in lower case.

Returns:

std::string A lower-case version of the string input , where numbers and special characters stay the same

static toUpperCase(input: str) str

Return a upper-case version of the string input . Numbers and special characters stay the same.

Parameters:
input: str

The input string for which we want to ensure that all the characters are in upper case.

Returns:

std::string A upper-case version of the string input , where numbers and special characters stay the same

static trim(s: str) str

Remove leading and trailing whitespaces from a string.

static writeBinaryValueLE(*args, **kwargs)

Overloaded function.

  1. writeBinaryValueLE(file: std::basic_ofstream<char, std::char_traits<char> >, short_value: int) -> None

Write a 16-bits integer value in little endian.

  1. writeBinaryValueLE(file: std::basic_ofstream<char, std::char_traits<char> >, ushort_value: int) -> None

Write a 16-bits unsigned integer value in little endian.

  1. writeBinaryValueLE(file: std::basic_ofstream<char, std::char_traits<char> >, int_value: int) -> None

Write a 32-bits integer value in little endian.

  1. writeBinaryValueLE(file: std::basic_ofstream<char, std::char_traits<char> >, int_value: int) -> None

Write a 32-bits unsigned integer value in little endian.

  1. writeBinaryValueLE(file: std::basic_ofstream<char, std::char_traits<char> >, float_value: float) -> None

Write a float value in little endian.

  1. writeBinaryValueLE(file: std::basic_ofstream<char, std::char_traits<char> >, double_value: float) -> None

Write a double value in little endian.