ohcount
Data Fields
SourceFile Struct Reference

Represents a single source code file. More...

#include <structs.h>

Data Fields

char * filepath
 
int dirpath
 
char * filename
 
char * ext
 
char * diskpath
 
char * contents
 
int size
 
const char * language
 
int language_detected
 
ParsedLanguageListparsed_language_list
 
LicenseListlicense_list
 
LocListloc_list
 
char ** filenames
 

Detailed Description

Represents a single source code file.

Field Documentation

◆ contents

char* SourceFile::contents

The contents of the file. Do not use this field. Use ohcount_sourcefile_get_contents() instead.

◆ dirpath

int SourceFile::dirpath

The last character address considered to be part of the directory path in filepath. This is an address in memory, not a length relative to filepath.

◆ diskpath

char* SourceFile::diskpath

If filepath does not represent the real location of the file on disk, this field does.

◆ ext

char* SourceFile::ext

The filepath's file extension.

◆ filename

char* SourceFile::filename

The filepath's filename.

◆ filenames

char** SourceFile::filenames

A string array of all filenames in this file's directory.

◆ filepath

char* SourceFile::filepath

The entire path to the file.

◆ language

const char* SourceFile::language

The file's detected source code language. Do not use this field. Use ohcount_sourcefile_get_language() instead.

◆ language_detected

int SourceFile::language_detected

Flag used internally for keeping track of whether or not ohcount_sourcefile_get_language() has been called for this file.

◆ license_list

LicenseList* SourceFile::license_list

A LicenseList of licenses detected. Do not use this field. Use ohcount_sourcefile_get_license_list() instead.

◆ loc_list

LocList* SourceFile::loc_list

A LocList of all lines of code in each language in the file. Do not use this field. Use ohcount_sourcefile_get_loc_list() instead.

◆ parsed_language_list

ParsedLanguageList* SourceFile::parsed_language_list

A ParsedLanguageList resulting from parsing the file. Do not use this field. Use ohcount_sourcefile_get_parsed_language_list() instead.

◆ size

int SourceFile::size

The size of the file's contents in bytes. Do not use this field. Use ohcount_sourcefile_get_contents_size() instead.


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