File status / listing.
More...
Returns infos about files matching a pattern.
This functions uses the FIND_FIRST2 SMB operations to list files matching a certain pattern. It's basically used to list folder contents
- Parameters
-
s | The session object |
tid | The share inside of which we want to find files obtained by smb_tree_connect() |
pattern | The pattern to match files. '\*' will list all the files at the root of the share. '\afolder\*' will list all the files inside of the 'afolder' directory. |
- Returns
- An opaque list of smb_stat or NULL in case of error
Get the status of a file from it's path inside of a share.
- Parameters
-
s | The session object |
tid | The tree id of a share obtained by smb_tree_connect() |
path | The full path of the file relative to the root of the share (e.g. '\folder\file.ext') |
- Returns
- An opaque smb_stat or NULL in case of error. You need to destory this object with smb_stat_destroy after usage.
Clear a smb_stat object, reclaiming its memory.
- Parameters
-
stat | A smb_stat object returned by smb_fstat. |
Get the status of an open file from it's file descriptor.
The file status will be those at the time of open
- Parameters
-
s | The session object |
fd | The smb_fd from which you want infos/status |
- Returns
- An opaque smb_stat or NULL in case of error. You don't own this object memory, and then don't have to destory it
uint64_t smb_stat_get |
( |
smb_stat |
info, |
|
|
int |
what |
|
) |
| |
Get a file attribute.
This function is a getter that allow you to retrieve various informations about a file on a smb_stat object. You can get its size, various timestamps, etc.
- Parameters
-
- Returns
- The meaning of the returned value depends on the 'what' parameter. See each item documentation.
Get the element at the given position.
- Parameters
-
list | A stat list |
index | The position of the element you want. |
- Returns
- An opaque smb_stat or NULL in case of error
Get the number of item in a smb_stat_list file info.
- Parameters
-
list | The list you want the length of |
- Returns
- The length of the list. It returns 0 if the list is invalid
Destroy and release a list of file stat returned by smb_find.
- Parameters
-
list | The stat_list to free |
const char* smb_stat_name |
( |
smb_stat |
info | ) |
|
Get the name of the file from its status.
- Parameters
-
- Returns
- A null-terminated string in you current locale encoding or NULL.