Directories within File List in Doxygen? - doxygen

I am documenting my project right now!
So as it stands, under "File List", I see something like this:
File List
Folder1/Sub_Folder1/File01
Folder1/Sub_Folder1/File02
Folder2/Sub_Folder1/File01
And what I'd like to see instead is this:
File List
Folder1
Folder2
Upon expending Folder1, it should look like this:
File List
Folder1
\Sub_Folder1
Folder2
Is this possible in Doxygen?
Thank you

Found it! In the doxygen configuration file..
SHOW_DIRECTORIES = YES
Will do the trick ;)

Related

how to limit search to certain folder AND certain file types (more than one) in visual studio code?

consider the following files and folders structure:
head.html
folder1
1.css (this file is inside "folder1")
1.html
1.php
folder2
1.css
1.html
1.php
subfolder2 (this is a subfolder inside "folder2")
1.css
1.html
1.php
deepsub2 (a folder inside "subfolder2" that is inside "folder2")
1.css
1.html
1.php
to clarify the structure:
"folder1", "folder2", "subfolder2" and "deepsub2" are folders.
all the rest are files.
"1.css", "1.html" and "1.php" under that appear under a folder, for example "folder1" are inside
that folder.
"head.html" is in the root folder.
"subfolder2" is a folder inside "folder2" and "deepsub2" is a folder inside "subfolder2".
What i'm trying to do is search the word "viewport" in "folder2" and anything beneath it (including its subfolders), which means I don't want search in other folders (folder1 for example) or the root (head.html for example)
I also want to limit the search for file types: .html and .css
I DON'T want to specifically exclude .php as a file type because consider that sometimes I don't know what other file types there are in the structure and they can be t0o many to exclude, so I want to only to use a list of file types to include rather.
after reading the docs: https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options
the best I could come up with is using the following in the "files to include" input:
./folder2/**/*.css,./folder2/**/*.html
but it doesn't seem efficiant enough because i'm using the "folder2" path part for every file type.
is there a better way?
I'm using VScode Version: 1.65.0 by the way
This should work:
./folder2/**/*.{css,html} NO spaces in the {...} extensions or it won't work
from https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options:
{} to group conditions (for example {**/*.html,**/*.txt} matches
all HTML and text files)

VSCode API: watch activities on workspace folders and sub-folders

I'm using createFileSystemWatcher() and onDidChange() to watch my workspace, but the watch is limited to root directory. I want to be able to watch activities in my sub directories too.
I will appreciate suggestions to fix it or recommend another function to achieve it.
File system watchers are not limited to the root directory. Most likely you're using a glob pattern that looks like something like this:
*.txt
What you want instead is something like this:
**/*.txt
See also: the docs for GlobPattern.
** to match any number of path segments, including none
VSCode API usage example:
let watcher = vscode.workspace.createFileSystemWatcher("**/*.txt");
watcher.onDidChange(uri => console.log("change to " + uri));

How to put all the file names into an array in MATLAB

I plan to list all the file names of a current folder (include subfolder) and put them and their path into an array. I can use s=dir to put the names and path of all the files in the current folder, I can also use "dir **/." to show the files in the current folder and subfolders.
But when I use "s=dir **/.", Matlab gives me error and I am not able to proceed. Is there anyone can help me on this?
The reason why I want to do this is to compare two folders which may contain plenty of duplicate files. I want to use file name as the indicator and to find out the new adding or removed files, so that I can update the log excel we have.
Thank you for your help.
To list only the files and not the directories try
file_names = dir('**/');
file_names = file_names(~[file_names.isdir]);
file_names = {file_names.name}
You were really close, you can just run:
s = dir('**\');
And that should get you what you need

Copy all files of one type from directory into one folder

This is a new one for me so I'm pretty much flying blind.
I have a folder at 192.168.1.2\mainFolder that contains folder1, folder2, and folder3. Inside each of those folders are a handful of different file extentions, and a couple of files of each type. I need to take all files that exist inside mainFolder of the .dep type, and copy them to 192.168.1.2\copyFolder
copyFolder will not have any folders inside it, but just many many files.
What is the best way to go about doing this? I have been told by TPTB that robocopy would be helpful, however I have never used robocopy and thought you guys may know of something better
So you don't want .dep files inside folder1, 2 etc.? Robocopy / xcopy is usually a good choice. Powershell is slow for such a simple operation. If you just want the .dep files in mainfolder but not those inside the subfolders, try:
robocopy \\192.168.1.2\mainFolder \\192.168.1.2\copyFolder *.dep

Issue with doxygen .dox files

I am trying to run doxygen on some source files for a project that I downloaded source files for. The files are located in the following directories:
doc/ - Documentation files, such as .dox files.
src/ - Source files
My settings in my doxygen.config file are:
INPUT = ../ .
FILE_PATTERNS = *.h *.dox *.dxx
When I run doxygen (doxygen doxygen.config), it generates all of the documentation from the .h files correctly, but it does not generate the mainpage correctly. I have a file titled intro.dox in the doc folder, with a command \mainpage Documentation Index, and a bunch of text, but doxygen is not using this to generate the main page.
What am I doing wrong?
There are (at least) two possible reasons for this:
You are not including the /doc directory in you INPUT list. Try modifying this to
INPUT = ../ . ../doc
Did you mean to write ../doc instead of ../? I am guessing that your doxygen.config file is in your src directory. If this is not the case can you make this clear in the question.
Doxygen requires that your documentation files (your .dox files) are plain text with your text wrapped with Doxygen C++ comments (i.e. /** ... */).
Without knowing where doxygen.config is located, and since you are using relative paths in INPUT, it is difficult to determine what might cause this, however since the files you are looking for are in parallel directories, it is possible that doxygen is not search recursively for your files. You may want to confirm that RECURSIVE is set to YES in doxygen.config.