Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
FileInformation Struct Reference

A datatype to hold a collection of metadata about a file. More...

#include <filesystem_utils.h>

Public Member Functions

void InitFileInformation (FileInformation *info_p)
 Initialise a FileInformation ready for use. More...
 
bool CalculateFileInformation (const char *const path_s, FileInformation *info_p)
 Calculate the FileInformation for a given filename. More...
 

Data Fields

time_t fi_last_modified
 The timestamp of the last modification to a file. More...
 
size_t fi_size
 The size of the file in bytes. More...
 

Detailed Description

A datatype to hold a collection of metadata about a file.

Member Function Documentation

◆ CalculateFileInformation()

bool CalculateFileInformation ( const char *const  path_s,
FileInformation info_p 
)

Calculate the FileInformation for a given filename.

Parameters
path_sThe path to the file/directory to get the information for.
info_pWhere the FileInformation will be stored.
Returns
true if the information was calculated successfully, false otherwise.

Field Documentation

◆ fi_last_modified

time_t fi_last_modified

The timestamp of the last modification to a file.

◆ fi_size

size_t fi_size

The size of the file in bytes.


The documentation for this struct was generated from the following file: