ohcount: SourceFile Struct Reference

# 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
ParsedLanguageList * | parsed_language_list
LicenseList * | license_list
LocList * | loc_list
char ** | filenames

## Detailed Description

Represents a single source code file.

## Field Documentation

char* SourceFile::contents

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

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.

char* SourceFile::diskpath

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

char* SourceFile::ext

The filepath's file extension.

char* SourceFile::filename

The filepath's filename.

char** SourceFile::filenames

A string array of all filenames in this file's directory. Do not use this field. Use ohcount_sourcefile_get_filenames() instead.

char* SourceFile::filepath

The entire path to the file.

const char* SourceFile::language

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

int SourceFile::language_detected

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

LicenseList* SourceFile::license_list

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

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.

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.

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:

- /Users/andy/dev/ohcount/src/structs.h