JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.

If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.

If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.

CodeSonar® 9.2p0 CONFIDENTIAL CodeSecure Inc
C and C++
Binaries
C#
Java

Description: Directories

API functions provide access to basic information about directories and support various traversals over the file system.

Language Module Support: Internal representation for directories is available for C/C++, binary, C#, and Java analyses.



Available Information

CodeSonar deduces a hierarchy of file system directories by inspecting the paths of all the source files contained in a project. In general, this deduced hierarchy will be a strict subset of the full file system structure, since directories will only be included if they directly or transitively contain source files belonging to the project.

API functions provide access to directory information as follows.

Given: Obtain:
<nothing>
  • The set of file system 'root' directories deduced by CodeSonar.
directory
  • Unnormalized directory path.
  • Normalized directory path.
    • Windows: this is the downcased version of the unnormalized directory path, with backslash directory separators replaced by forward slashes.
    • Mac: this is the downcased version of the unnormalized directory path.
    • Otherwise: this is the same as the unnormalized directory path.
  • Directory depth (distance from root).
  • The parent directory, if any.
  • The immediate child directories.
  • The source files immediately contained in the directory.

Links

By API implementation:

Language Directory Functionality and Types Provided By Directory Type
C++ class directory class directory
Python class directory class directory
C Header cs_directory.h typedef cs_directory

See also:

 

To report problems with this documentation, please visit https://support.codesecure.com/.