user33435: I'm using the SDFat library and the FatFile type has the functions:

bool FatFile::dirEntry(dir_t* dir)
Return a file's directory entry.
Parameters

[out] dir    Location for return of the file's directory entry.

Returns

The value true is returned for success and the value false is returned
    for failure.


And

uint8_t FatFile::dirName(const dir_t *dir, char *name)
Format the name field of dir into the 13 byte array name in standard
  8.3 short name format.
Parameters

[in] dir The directory structure containing the name.
[out]    name    A 13 byte char array for the formatted name.

Returns

length of the name.


From what I understand, I should be able to pass something like this into the functions:
dir_t Bass;
char dName [13];
FatFile BrowseFile;
BrowseFile.open("/Folder1/File1.txt", O_RDONLY);
Serial.print(BrowseFile.dirEntry(&*Bass));
Serial.print(BrowseFile.dirName(Bass,*dName));
Serial.println(dName);

to which the program should output
1
[Folder1's 8.3 name length]
[Folder1's 8.3 name]

However, I'm getting an error and I can't find any included examples that use these two functions in a sketch. if someone could explain what I'm doing wrong, it would be greatly appreciated.

user4143: dir_t * is a pointer to a variable of type dir_t.
I don't know the API to which you refer, but the format for passing it would be:
dir_t Bass;
char dName[13];
BrowseFile.dirEntry(&Bass);
BrowseFile.dirName(&Bass, dName);
Serial.println(dName);


user30005: 
what is dir_t*?

a pointer to a data type called  dir_t -> it must have been defined somewhere in  your code/libraries used.

33435: <p>I'm using the <a href="https://github.com/greiman/SdFat" rel="nofollow noreferrer">SDFat library</a> and the <code>FatFile</code> type has the functions:</p>

<blockquote>
  <p><code>bool FatFile::dirEntry(dir_t* dir)</code></p>
  
  <p>Return a file's directory entry.</p>
  
  <p><strong>Parameters</strong></p>
  
  <blockquote>
    <p>[out] <strong>dir</strong>    Location for return of the file's directory entry.</p>
  </blockquote>
  
  <p><strong>Returns</strong></p>
  
  <blockquote>
    <p>The value true is returned for success and the value false is returned
    for failure.</p>
  </blockquote>
</blockquote>

<p>And</p>

<blockquote>
  <p><code>uint8_t FatFile::dirName(const dir_t *dir, char *name)</code></p>
  
  <p>Format the name field of dir into the 13 byte array name in standard
  8.3 short name format.</p>
  
  <p><strong>Parameters</strong></p>
  
  <blockquote>
    <p>[in] dir The directory structure containing the name.</p>
    
    <p>[out]    name    A 13 byte char array for the formatted name.</p>
  </blockquote>
  
  <p><strong>Returns</strong></p>
  
  <blockquote>
    <p>length of the name.</p>
  </blockquote>
</blockquote>

<p>From what I understand, I should be able to pass something like this into the functions:</p>

<pre><code>dir_t Bass;
char dName [13];
FatFile BrowseFile;
BrowseFile.open("/Folder1/File1.txt", O_RDONLY);
Serial.print(BrowseFile.dirEntry(&amp;*Bass));
Serial.print(BrowseFile.dirName(Bass,*dName));
Serial.println(dName);
</code></pre>

<p>to which the program should output</p>

<pre><code>1
[Folder1's 8.3 name length]
[Folder1's 8.3 name]
</code></pre>

<p>However, I'm getting an error and I can't find any included examples that use these two functions in a sketch. if someone could explain what I'm doing wrong, it would be greatly appreciated.</p>
 4143: <p><code>dir_t *</code> is a pointer to a variable of type <code>dir_t</code>.</p>

<p>I don't know the API to which you refer, but the format for passing it would be:</p>

<pre><code>dir_t Bass;
char dName[13];
BrowseFile.dirEntry(&amp;Bass);
BrowseFile.dirName(&amp;Bass, dName);
Serial.println(dName);
</code></pre>
 30005: <blockquote>
  <p>what is dir_t*?</p>
</blockquote>

<p>a pointer to a data type called  dir_t -> it must have been defined somewhere in  your code/libraries used.</p>
