VLC  3.0.0-git
Modules | Files | Functions
File system
Collaboration diagram for File system:

Modules

 File descriptors
 
 Directories
 

Files

file  vlc_fs.h
 The functions in this file help with using low-level Unix-style file descriptors, BSD sockets and directories.
 

Functions

int vlc_stat (const char *filename, struct stat *)
 Finds file/inode information - like stat(). More...
 
int vlc_lstat (const char *filename, struct stat *)
 Finds file/inode information, as lstat(). More...
 
int vlc_unlink (const char *filename)
 Removes a file. More...
 
int vlc_rename (const char *oldpath, const char *newpath)
 Moves a file atomically. More...
 
FILE * vlc_fopen (const char *filename, const char *mode)
 Opens a FILE pointer. More...
 

Detailed Description

Function Documentation

◆ vlc_fopen()

FILE* vlc_fopen ( const char *  filename,
const char *  mode 
)

Opens a FILE pointer.

Parameters
filenamefile path, using UTF-8 encoding
modefopen file open mode
Returns
NULL on error, an open FILE pointer on success.

References vlc_close(), and vlc_open().

Referenced by config_OpenConfigFile(), hash_from_binary_file(), ImageWriteUrl(), libvlc_InternalInit(), playlist_Export(), playlist_FindArtInCacheUsingItemUID(), playlist_SaveArt(), TsStorageNew(), update_DownloadReal(), and vout_snapshot_SaveImage().

◆ vlc_lstat()

int vlc_lstat ( const char *  filename,
struct stat *   
)

Finds file/inode information, as lstat().

Consider using fstat() instead, if possible.

Parameters
filenameUTF-8 file path

References lstat, vlc_stat(), and vlc_statEx().

◆ vlc_rename()

int vlc_rename ( const char *  oldpath,
const char *  newpath 
)

Moves a file atomically.

This only works within a single file system.

Parameters
oldpathpath to the file before the move
newpathintended path to the file after the move
Returns
A 0 return value indicates success. A -1 return value indicates an error, and an error code is stored in errno

References ToLocaleDup, and widen_path().

Referenced by config_SaveConfigFile(), and playlist_MLDump().

◆ vlc_stat()

int vlc_stat ( const char *  filename,
struct stat *   
)

Finds file/inode information - like stat().

Note
As far as possible, fstat() should be used instead.
Parameters
filenameUTF-8 file path

References static_assert, vlc_statEx(), and widen_path().

Referenced by input_SubtitleFile2Uri(), InputGetExtraFilesPattern(), module_InitStaticModules(), playlist_MLLoad(), playlist_SaveArt(), subtitles_Detect(), vlc_lstat(), and vout_snapshot_SaveImage().

◆ vlc_unlink()

int vlc_unlink ( const char *  filename)

Removes a file.

Parameters
filenamea UTF-8 string with the name of the file you want to delete.
Returns
A 0 return value indicates success. A -1 return value indicates an error, and an error code is stored in errno

References ToLocaleDup, unlikely, and widen_path().

Referenced by config_SaveConfigFile(), playlist_MLDump(), TsStorageDelete(), TsStorageNew(), and update_DownloadReal().