Veritable Lasagna
An Allocator & Data Structure Library for C.
Loading...
Searching...
No Matches
vl_filesys_win32.c File Reference
#include <shlwapi.h>
#include <windows.h>
+ Include dependency graph for vl_filesys_win32.c:

Data Structures

struct  vl_filesys_iter
 Opaque handle for filesystem directory iteration. More...
 

Functions

vl_filesys_result vlFSStatPath (const vl_filesys_path *path, vl_filesys_stat *result)
 Gets file status information for a given path.
 
vl_filesys_result vlFSStatIter (vl_filesys_iter iter, vl_filesys_stat *result)
 Gets file status information for the current iterator position.
 
void vlFSPathAbsolute (vl_filesys_path *path)
 Converts a relative path to an absolute path.
 
vl_bool_t vlFSPathIsAbsolute (const vl_filesys_path *path)
 Checks if a filesystem path is absolute.
 
vl_filesys_result vlFSPathMkDir (const vl_filesys_path *path)
 Creates a directory at the specified path.
 
vl_filesys_result vlFSPathRemove (const vl_filesys_path *path)
 Removes a file or directory at the specified path.
 
vl_bool_t vlFSPathExists (const vl_filesys_path *path)
 Checks if a file or directory exists at the specified path.
 
vl_filesys_iter vlFSIterNew (vl_filesys *sys)
 Creates a new directory iterator.
 
void vlFSIterDelete (vl_filesys_iter iter)
 Deletes a directory iterator.
 
vl_filesys_result vl_FSIterInit (vl_filesys_iter *iter, const vl_filesys_path *path)
 
vl_filesys_result vlFSIterDir (vl_filesys_iter *iter, const vl_filesys_path *path)
 Initializes an iterator for a directory.
 
vl_filesys_result vlFSIterDirRecursive (vl_filesys_iter *iter, const vl_filesys_path *path)
 Initializes an iterator for recursive directory traversal.
 
vl_bool_t vlFSIterNext (vl_filesys_iter *iter)
 Advances the iterator to the next entry.
 

Data Structure Documentation

◆ vl_filesys_iter_

struct vl_filesys_iter_

Opaque handle for filesystem directory iteration.

+ Collaboration diagram for vl_filesys_iter:
Data Fields
DIR * dir
vl_filesys_path * dirPath
struct dirent * entry
WIN32_FIND_DATAW findData
HANDLE findHandle
vl_bool_t hasNextEntry
vl_pool_idx iterIdx
vl_bool_t recursive
struct vl_filesys_iter_ * stackPrev
vl_filesys * sys

Function Documentation

◆ vl_FSIterInit()

vl_filesys_result vl_FSIterInit ( vl_filesys_iter *  iter,
const vl_filesys_path path 
)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlFSIterDelete()

void vlFSIterDelete ( vl_filesys_iter  iter)

Deletes a directory iterator.

Parameters
iterIterator handle to delete
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlFSIterDir()

vl_filesys_result vlFSIterDir ( vl_filesys_iter *  iter,
const vl_filesys_path path 
)

Initializes an iterator for a directory.

Parameters
[in,out]iterPointer to the iterator handle
pathPointer to the directory path to iterate
Returns
Result code indicating success or failure
+ Here is the call graph for this function:

◆ vlFSIterDirRecursive()

vl_filesys_result vlFSIterDirRecursive ( vl_filesys_iter *  iterPtr,
const vl_filesys_path path 
)

Initializes an iterator for recursive directory traversal.

Parameters
[in,out]iterPtrPointer to the iterator handle
pathPointer to the directory path to iterate recursively
Returns
Result code indicating success or failure
+ Here is the call graph for this function:

◆ vlFSIterNew()

vl_filesys_iter vlFSIterNew ( vl_filesys sys)

Creates a new directory iterator.

Parameters
sysPointer to the filesystem context
Returns
Handle to the new iterator or VL_FS_ITER_INVALID on failure
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlFSIterNext()

vl_bool_t vlFSIterNext ( vl_filesys_iter *  iter)

Advances the iterator to the next entry.

Parameters
[in,out]iterPointer to the iterator handle
Returns
True if there is a next entry, false if iteration is complete
+ Here is the call graph for this function:

◆ vlFSPathAbsolute()

void vlFSPathAbsolute ( vl_filesys_path path)

Converts a relative path to an absolute path.

Parameters
pathPointer to the path object to make absolute
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlFSPathExists()

vl_bool_t vlFSPathExists ( const vl_filesys_path path)

Checks if a file or directory exists at the specified path.

Parameters
pathPointer to the path to check
Returns
True if the path exists, false otherwise
+ Here is the call graph for this function:

◆ vlFSPathIsAbsolute()

vl_bool_t vlFSPathIsAbsolute ( const vl_filesys_path path)

Checks if a filesystem path is absolute.

Parameters
pathPointer to the path object to check
Returns
True if the path is absolute, false otherwise
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlFSPathMkDir()

vl_filesys_result vlFSPathMkDir ( const vl_filesys_path path)

Creates a directory at the specified path.

Parameters
pathPointer to the path where the directory should be created
Returns
Result code indicating success or failure
+ Here is the call graph for this function:

◆ vlFSPathRemove()

vl_filesys_result vlFSPathRemove ( const vl_filesys_path path)

Removes a file or directory at the specified path.

Parameters
pathPointer to the path to remove
Returns
Result code indicating success or failure
+ Here is the call graph for this function:

◆ vlFSStatIter()

vl_filesys_result vlFSStatIter ( vl_filesys_iter  iter,
vl_filesys_stat result 
)

Gets file status information for the current iterator position.

Parameters
iterDirectory iterator handle
[out]resultPointer to store the stat information
Returns
Result code indicating success or failure
+ Here is the call graph for this function:

◆ vlFSStatPath()

vl_filesys_result vlFSStatPath ( const vl_filesys_path path,
vl_filesys_stat result 
)

Gets file status information for a given path.

Parameters
pathPointer to the path to query
[out]resultPointer to store the stat information
Returns
Result code indicating success or failure
+ Here is the call graph for this function: