⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pifinfo.h

📁 mini http server,可以集成嵌入到程序中,实现简单的web功能
💻 H
📖 第 1 页 / 共 2 页
字号:

 Errors:
	This function does not generate an error.

 See Also:
	PIFInfo_exists(), PIFInfo_isRegular(), PIFInfo_isReadable(),
	PIFInfo_isLink().
\*____________________________________________________________________________*/
PUBLIC_PIAPI int PIFInfo_isDirectory( PIFInfo *pFileInfo );

/*____________________________________________________________________________*\
 *
 Name:
	PIFInfo_isLink

 Synopsis:
	int PIFInfo_isLink( PIFInfo *pFileInfo )

 Description:
	Specifies whether or not the file information object pFileInfo
	refers to a symbolic link.
	
 Notes:

 Return Values:
	On success PIFInfo_isLink() returns either PIAPI_TRUE or
	PIAPI_FALSE, indicating whether or not a file respresented by
	pFileInfo is a symbolic link.

 Errors:
	This function does not generate an error.

 See Also:
	PIFInfo_exists(), PIFInfo_isRegular(), PIFInfo_isReadable(),
	PIFInfo_isDirectory().
\*____________________________________________________________________________*/
PUBLIC_PIAPI int PIFInfo_isLink( PIFInfo *pFileInfo );

/*____________________________________________________________________________*\
 *
 Name:
	PIFInfo_isReadable

 Synopsis:
	int PIFInfo_isReadable( PIFInfo *pFileInfo )

 Description:
	Specifies whether or not the file information object pFileInfo
	refers to a file that may be opened for reading.
	
 Notes:
	The readibility of a file is effected by its permissions, the
	user privilages of the executing program and the exclusive lock
	status of the file.

 Return Values:
	On success PIFInfo_isReadable() returns either PIAPI_TRUE or
	PIAPI_FALSE, indicating whether or not a file respresented by
	pFileInfo may be opened for reading.

 Errors:
	This function does not generate an error.

 See Also:
	PIFInfo_exists(), PIFInfo_isRegular(), PIFInfo_isExecutable(),
	PIFInfo_isWritable(), PIFInfo_isDirectory(), PIFInfo_isLink().
\*____________________________________________________________________________*/
PUBLIC_PIAPI int PIFInfo_isReadable( PIFInfo *pFileInfo );

/*____________________________________________________________________________*\
 *
 Name:
	PIFInfo_isWritable

 Synopsis:
	int PIFInfo_isWritable( PIFInfo *pFileInfo )

 Description:
	Specifies whether or not the file information object pFileInfo
	refers to a file that may be opened for writting.
	
 Notes:
	The readibility of a file is effected by its permissions, the
	user privilages of the executing program and the types of locks
	held on the file.

 Return Values:
	On success PIFInfo_isWritable() returns either PIAPI_TRUE or
	PIAPI_FALSE, indicating whether or not a file respresented by
	pFileInfo may be opened for writting.

 Errors:
	This function does not generate an error.

 See Also:
	PIFInfo_exists(), PIFInfo_isRegular(), PIFInfo_isReadable(),
	PIFInfo_isExecutable(), PIFInfo_isDirectory(), PIFInfo_isLink().
\*____________________________________________________________________________*/
PUBLIC_PIAPI int PIFInfo_isWritable( PIFInfo *pFileInfo );

/*____________________________________________________________________________*\
 *
 Name:
	PIFInfo_isExecutable

 Synopsis:
	int PIFInfo_isExecutable( PIFInfo *pFileInfo )

 Description:
	Specifies whether or not the file information object pFileInfo
	refers to a file that may be executed as a program.
	
 Notes:
	The execute status of a file is effected by its permissions, the
	user privilages of the executing program and the exclusive lock
	status of the file.

 Return Values:
	On success PIFInfo_isExecutable() returns either PIAPI_TRUE or
	PIAPI_FALSE, indicating whether or not a file respresented by
	pFileInfo may be executed.

 Errors:
	This function does not generate an error.

 See Also:
	PIFInfo_exists(), PIFInfo_isRegular(), PIFInfo_isReadable(),
	PIFInfo_isWritable(), PIFInfo_isDirectory(), PIFInfo_isLink().
\*____________________________________________________________________________*/
PUBLIC_PIAPI int PIFInfo_isExecutable( PIFInfo *pFileInfo );

/*____________________________________________________________________________*\
 *
 Name:
	PIFInfo_getSize

 Synopsis:
	PIPLATFORM_FSIZE PIFInfo_getSize( PIFInfo *pFileInfo )

 Description:
	Specifies the size of the file represented by file information
	object pFileInfo.
	
 Notes:
	PIPlatform_getLastError() must be used to distinguish an error
	condition from a zero length file.

 Return Values:
	On success PIFInfo_getSize() returns the file size. On failure
	PIFInfo_getSize() returns 0.

 Errors:
	PIPlatform_getLastError() can be examined to distinguish an error
	condition from a zero byte file. PIFInfo_getSize() will set the
	thread specific error code to PIAPI_COMPLETED before attempting to
	get the file size. If PIPlatform_getLastError() returns 0
	(PIAPI_COMPLETED) then no error occured. See 'Errors' for a full
	description of possible errors.

 See Also:
	PIFInfo_getExtension(), PIFInfo_getName().
\*____________________________________________________________________________*/
PUBLIC_PIAPI PIPLATFORM_FSIZE PIFInfo_getSize( PIFInfo *pFileInfo );

/*____________________________________________________________________________*\
 *
 Name:
	PIFInfo_getLastModified

 Synopsis:
	PIPLATFORM_TIME PIFInfo_getLastModified( PIFInfo *pFileInfo )

 Description:
	Gives the time of the last modification to the file specified
	by pFileInfo.
	
 Notes:
	Time is measured in seconds elapsed since 00:00:00 UTC, Jan. 1, 1970.

 Return Values:
	On success PIFInfo_getLastModified() returns the time of the last modification
	to the file pFileInfo. On error PIFInfo_getLastModified() returns 0.

 Errors:
	PIPlatform_getLastError() can be examined to distinguish an error
	condition from a file which was last modified at exactly
	00:00:00 UTC, Jan. 1, 1970.

 See Also:
\*____________________________________________________________________________*/
PUBLIC_PIAPI PIPLATFORM_TIME PIFInfo_getLastModified( PIFInfo *pFileInfo );

/*____________________________________________________________________________*\
 *
 Name:
	PIFInfo_getExtension

 Synopsis:
	const char *PIFInfo_getExtension( PIFInfo *pFileInfo )

 Description:
	Returns the extension of the file represented by pFileInfo.
	A file extension is the sequence of characters following the
	last period ('.') in the filename, when scanning left to right.
	
 Notes:
	PIFInfo_getExtension() may operate correctly even when pFileInfo	
	does not represent a real file.

	The returned value is a pointer to a component of the filename
	as represented internally in the PIFInfo object. Some functions
	such as PIFInfo_delete() will cause this pointer to become
	invalid.

 Return Values:
	On success PIFInfo_getExtension() returns the extension of the
	file. If the file does not have an extension this will be 
	the empty string ("").

 Errors:
	If pFileInfo is NULL an error occurs PIFInfo_getExtension() returns
	NULL.

	More specific error information can be retrieved using
	PIPlatform_getLastError().

 See Also:
	PIFInfo_getPath().
\*____________________________________________________________________________*/
PUBLIC_PIAPI const char *PIFInfo_getExtension( PIFInfo *pFileInfo );

/*____________________________________________________________________________*\
 *
 Name:
	PIFInfo_getFirstFileInDirectory

 Synopsis:
	PIFInfo *PIFInfo_getFirstFileInDirectory( PIFInfo *pFileInfo )

 Description:
	Returns a new PIFInfo object which contains information about the
	first file in the directory referred to by pFileInfo. This object
	can be used in subsequent calls to PIFInfo_getNextFileInDirectory() to
	iterate through all files in a directory.
	
 Notes:
	PIFInfo_getFirstFileInDirectory() allocates a new PIFInfo object,
	distinct from pFileInfo which must be seperately destroyed using
	PIFInfo_delete().

 Return Values:
	On success PIFInfo_getFirstFileInDirectory() returns a non-NULL pointer
	to a valid PIFInfo object.

 Errors:
	On error PIFInfo_getFirstFileInDirectory() returns NULL and
	PIPlatform_getLastError() can be used to retrieve an error code
	indicating the reason for the failure.

 See Also:
	PIFInfo_getNextFileInDirectory().
\*____________________________________________________________________________*/
PUBLIC_PIAPI PIFInfo *PIFInfo_getFirstFileInDirectory( PIFInfo *pFileInfo );

/*____________________________________________________________________________*\
 *
 Name:
	PIFInfo_getNextFileInDirectory

 Synopsis:
	int PIFInfo_getNextFileInDirectory( PIFInfo *pFileInfo )

 Description:
	Makes pFileInfo point to the next file in the directory. The object
	referred to by pFileInfo must have been created with a call to
	PIFInfo_getFirstFileInDirectory().

 Notes:
	If pFileInfo refers the last file in the directory,
	PIFInfo_getNextFileInDirectory() returns PIAPI_FALSE and pFileInfo
	does no refer to a valid file.

 Return Values:
	On success PIFInfo_getNextFileInDirectory() returns PIAPI_TRUE and
	pFileInfo points to the next file in the directory. If there
	are no other files in the directory or an error occurs 
	PIFInfo_getNextFileInDirectory() returns PIAPI_FALSE.
	The object pFileInfo should be destroy using PIFInfo_delete() when
	it is no longer needed.

 Errors:
	On error PIFInfo_getNextFileInDirectory() returns PIAPI_FALSE and
	PIPlatform_getLastError() returns a value other than
	PIAPI_COMPLETED indicating which error occurred.

 See Also:
	PIFInfo_getFirstFileInDirectory()
\*____________________________________________________________________________*/
PUBLIC_PIAPI int PIFInfo_getNextFileInDirectory( PIFInfo *pFileInfo );

#endif /* PIFINFO_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -