📄 conafilesystem.h
字号:
// only two backslash characters "\\".
// If the current folder is required to move sub folder,
// the path must not include any backslashes.
// If the current folder is required to change the
// parent folder, the first two characters must be dots
// and the third character must be a backslash "..\".
//
// Return values:
// CONA_OK
// ECONA_INVALID_HANDLE
// ECONA_INVALID_PARAMETER
// ECONA_INVALID_POINTER
// ECONA_CONNECTION_BUSY
// ECONA_CONNECTION_LOST
// ECONA_CURRENT_FOLDER_NOT_FOUND
// ECONA_FOLDER_NOT_FOUND
// ECONA_FOLDER_PATH_TOO_LONG
// ECONA_FOLDER_NAME_INVALID
// ECONA_FOLDER_NO_PERMISSION
// ECONA_CANCELLED
// ECONA_FAILED_TIMEOUT
// ECONA_UNKNOWN_ERROR_DEVICE
// ECONA_NOT_INITIALIZED
// ECONA_UNKNOWN_ERROR
//
PCCS_FSAPI CONASetCurrentFolder( FSHANDLE hFSHandle, const WCHAR* pstrPath );
//=========================================================
//=========================================================
// CONAGetCurrentFolder
//
// Description:
// CONAGetCurrentFolder returns the current folder, which is
// set by using the CONASetCurrentFolder function.
//
// Parameters:
// hFSHandle [in] File System handle
// ppstrPath [out] Pointer to the WCHAR receiving
// the current folder.
//
//
// Return values:
// CONA_OK
// ECONA_INVALID_HANDLE
// ECONA_INVALID_POINTER
// ECONA_CONNECTION_LOST
// ECONA_CANCELLED
// ECONA_FAILED_TIMEOUT
// ECONA_NOT_INITIALIZED
// ECONA_UNKNOWN_ERROR
//
PCCS_FSAPI CONAGetCurrentFolder( FSHANDLE hFSHandle, WCHAR** ppstrPath );
//=========================================================
//=========================================================
// CONAFindBegin
//
// Description:
// CONAFindBegin starts find files and subfolders from currect
// folder or target path. If target path is used, path must be
// absolute path.Find option:
// CONA_FIND_USE_CACHE Use cache if it is available.
//
// Parameters:
// hFSHandle [in] File System handle
// dwFindOptions [in] Find options:If CONA_FIND_USE_CACHE option
// is not used, value must be 0.
// pFileHandle [out] Pointer to find handle
// pstrTargetPath [in] Target path. If the path is NULL,
// the current folder is used
//
// Return values:
// CONA_OK
// ECONA_INVALID_HANDLE
// ECONA_INVALID_PARAMETER
// ECONA_INVALID_POINTER
// ECONA_CONNECTION_BUSY
// ECONA_CONNECTION_LOST
// ECONA_INVALID_DATA_DEVICE
// ECONA_CURRENT_FOLDER_NOT_FOUND
// ECONA_CANCELLED
// ECONA_FAILED_TIMEOUT
// ECONA_UNKNOWN_ERROR_DEVICE
// ECONA_NOT_INITIALIZED
// ECONA_NOT_ENOUGH_MEMORY
// ECONA_UNKNOWN_ERROR
// ECONA_FOLDER_PATH_TOO_LONG
// ECONA_FOLDER_NAME_INVALID
// ECONA_FOLDER_NO_PERMISSION
//
PCCS_FSAPI CONAFindBegin( FSHANDLE hFSHandle,
DWORD dwFindOptions,
FINDHANDLE* phFindHandle,
const WCHAR* pstrTargetPath );
//=========================================================
//=========================================================
// CONAFindNextFolder
//
// Description:
// CONAFindNextFolder returns the folder information for one
// folder and continues the search to the next folder. The
// folder information is returned with the CONAPI_FOLDER_INFO
// structure. The allocated memory MUST be freed by calling
// the CONAFreeFolderInfoStructure function.
//
// Parameters:
// hFindHandle [in] Find handle
// pFolderInfo [out] Pointer to the folder's info struct.
//
// Return values:
// CONA_OK
// ECONA_ALL_LISTED
// ECONA_INVALID_HANDLE
// ECONA_INVALID_POINTER
// ECONA_NOT_INITIALIZED
// ECONA_UNKNOWN_ERROR
//
PCCS_FSAPI CONAFindNextFolder( FINDHANDLE hFindHandle,
LPCONAPI_FOLDER_INFO pFolderInfo );
//=========================================================
//=========================================================
// CONAFindNextFile
//
// Description:
// CONAFindNextFile returns file information for one file,
// and continues the search to the next file. File information
// is returned with the CONAPI_FILE_INFO structure. Allocated
// memory MUST be freed by calling CONAFreeFileInfoStructure function.
//
// Parameters:
// hFindHandle [in] Find handle
// pFileInfo [out] Pointer to the file's info struct.
//
// Return values:
// CONA_OK
// ECONA_ALL_LISTED
// ECONA_INVALID_HANDLE
// ECONA_INVALID_POINTER
// ECONA_NOT_INITIALIZED
// ECONA_UNKNOWN_ERROR
//
PCCS_FSAPI CONAFindNextFile( FINDHANDLE hFindHandle, LPCONAPI_FILE_INFO pFileInfo );
//=========================================================
//=========================================================
// CONAFindEnd
//
// Description:
// CONAFindEnd closes find handle.
//
//
// Parameters:
// hFindHandle [in] Find handle
//
// Return values:
// CONA_OK
// ECONA_INVALID_HANDLE
//
PCCS_FSAPI CONAFindEnd( FINDHANDLE hFindHandle );
//=========================================================
//=========================================================
// CONACreateFolder
//
// Description:
// CONACreateFolder creates a new folder onto the device.
// The function fails if the folder already exists on the device.
//
// Parameters:
// hFSHandle [in] File System handle
// pstrFolderName [in] New folder name string
// pstrTargetPath [in] Target path. If path is NULL, current
// folder is used.
//
// Return values:
// CONA_OK
// ECONA_INVALID_HANDLE
// ECONA_INVALID_PARAMETER
// ECONA_INVALID_POINTER
// ECONA_CONNECTION_BUSY
// ECONA_CONNECTION_LOST
// ECONA_INVALID_DATA_DEVICE
// ECONA_CURRENT_FOLDER_NOT_FOUND
// ECONA_FOLDER_PATH_TOO_LONG
// ECONA_FOLDER_NAME_INVALID
// ECONA_FOLDER_ALREADY_EXIST
// ECONA_FOLDER_NO_PERMISSION
// ECONA_CANCELLED
// ECONA_NOTHING_TO_CANCEL
// ECONA_FAILED_TIMEOUT
// ECONA_UNKNOWN_ERROR_DEVICE
// ECONA_NOT_INITIALIZED
// ECONA_UNKNOWN_ERROR
//
PCCS_FSAPI CONACreateFolder( FSHANDLE hFSHandle,
const WCHAR* pstrFolderName,
const WCHAR* pstrTargetPath);
//=========================================================
//=========================================================
// CONADeleteFolder
//
// Description:
// CONADeleteFolder deletes a folder from the device. This
// function does not delete the folder if the folder includes
// any subfolder(s)! Only an empty folder and a folder that
// contains files can be deleted. If the folder does not include
// a DELETE-permission, the function fails.
//
// Note: No rollback option! Deleted data cannot be restored!
//
// Parameters:
// hFSHandle [in] File System handle
// pstrFolderName [in] Folder name string
// dwDeleteOptions [in] Delete options. Possible values:
// CONA_DELETE_FOLDER_EMPTY: Only an empty folder can be deleted.
// CONA_DELETE_FOLDER_WITH_FILES: Only a folder that contains file(s) can be deleted.
// pstrTargetPath [in] Target path. If path is NULL, current
// folder is used.
//
// Return values:
// CONA_OK
// ECONA_INVALID_HANDLE
// ECONA_INVALID_PARAMETER
// ECONA_INVALID_POINTER
// ECONA_CONNECTION_BUSY
// ECONA_CONNECTION_LOST
// ECONA_INVALID_DATA_DEVICE
// ECONA_CURRENT_FOLDER_NOT_FOUND
// ECONA_FOLDER_PATH_TOO_LONG
// ECONA_FOLDER_NAME_INVALID
// ECONA_FOLDER_NOT_FOUND
// ECONA_FOLDER_NOT_EMPTY
// ECONA_FOLDER_NO_PERMISSION
// ECONA_CANCELLED
// ECONA_NOTHING_TO_CANCEL
// ECONA_FAILED_TIMEOUT
// ECONA_UNKNOWN_ERROR_DEVICE
// ECONA_NOT_INITIALIZED
// ECONA_UNKNOWN_ERROR
//
PCCS_FSAPI CONADeleteFolder( FSHANDLE hFSHandle,
const WCHAR* pstrFolderName,
DWORD dwDeleteOptions,
const WCHAR* pstrTargetPath);
//=========================================================
//=========================================================
// CONARenameFolder
//
// Description:
// CONARenameFolder renames a folder on the device.
//
// Only an empty folder can be renamed with the some of devices.
// If the device is supporting a non-empty folder rename,
// CONAPI_FS_EXTENDED_OPERATIONS value is set in
// CONAPI_DEVICE_GEN_INFO structure. For more details, see
// CONAGetDeviceInfo function of Device Management API.
//
// Parameters:
// hFSHandle [in] File System handle
// pstrFolderName [in] Folder name string.
// pstrFolderNameNew [in] Folder's new name string.
// pstrTargetPath [in] Target path. If the path is NULL,
// current folder is used.
//
// Return values:
// CONA_OK
// ECONA_INVALID_HANDLE
// ECONA_INVALID_PARAMETER
// ECONA_INVALID_POINTER
// ECONA_CONNECTION_BUSY
// ECONA_CONNECTION_LOST
// ECONA_INVALID_DATA_DEVICE
// ECONA_CURRENT_FOLDER_NOT_FOUND
// ECONA_FOLDER_PATH_TOO_LONG
// ECONA_FOLDER_NAME_INVALID
// ECONA_FOLDER_ALREADY_EXIST
// ECONA_FOLDER_NOT_FOUND
// ECONA_FOLDER_NOT_EMPTY
// ECONA_FOLDER_NO_PERMISSION
// ECONA_CANCELLED
// ECONA_NOTHING_TO_CANCEL
// ECONA_FAILED_TIMEOUT
// ECONA_UNKNOWN_ERROR_DEVICE
// ECONA_NOT_INITIALIZED
// ECONA_UNKNOWN_ERROR
//
PCCS_FSAPI CONARenameFolder( FSHANDLE hFSHandle,
const WCHAR* pstrFolderName,
const WCHAR* pstrFolderNameNew,
const WCHAR* pstrTargetPath);
//=========================================================
//=========================================================
// CONAGetFolderInfo
//
// Description:
// CONAGetFolderInfo sets required information to
// CONAPI_FOLDER_CONTENT structure. The Connectivity API-user
// MUST initialize the CONAPI_FOLDER_CONTENT structure before
// calling this function!
//
// When option CONA_GET_FOLDER_INFO is used, it adds the next
// data to CONAPI_FOLDER_CONTENT structure:
// CONAPI_FOLDER_INFO2 structure from target folder. The
// number of files and folders in target folder and total
// size of folder content are not set.
//
// When option CONA_GET_FOLDER_CONTENT is used, it adds the
// next data to CONAPI_FOLDER_CONTENT structure:
// CONAPI_FOLDER_INFO2 structure from target folder. The
// number of files and folders in target folder and total
// size of folder content are not set.
// CONAPI_FILE_INFO structure(s) from file(s), which
// are in target folder.
// CONAPI_FOLDER_CONTENT structure(s) from sub folder(s),
// which are in target folder. Every structure includes
// only CONAPI_FOLDER_INFO2 structure.
//
// When option CONA_GET_FOLDER_AND_SUB_FOLDERS_CONTENT is used,
// it adds the next data to CONAPI_FOLDER_CONTENT structure:
// CONAPI_FILE_INFO structure(s) from file(s), which
// are in target folder.
// CONAPI_FOLDER_CONTENT structure(s) from sub folder(s),
// which are in target folder. Every structure includes
// CONAPI_FOLDER_INFO2 structure. If sub folder(s) contain
// file(s) or/and folder(s) those are also included.
//
// Allocated memory must be freed by calling the
// CONAFreeFolderContentStructure function.
//
//
// Parameters:
// hFSHandle [in] File System handle
// dwOptions [in] Get folder info options:
// CONAPI_ALLOW_TO_USE_CACHE: If the cached folder data
// is available, it will be used. This value is
// optional and can be used with other values.
// CONA_COMPARE_AND_UPDATE_IF_NEEDED: Compare given folder
// content structure and returns one of the value:
// CONA_OK: Structure is not updated because it
// is up-to-date.
// CONA_OK_UPDATED_MEMORY_VALUES: Structure is updated
// because of free, used and total memory values
// are updated.
// CONA_OK_UPDATED_MEMORY_AND_FILES: Structure is
// updated because of file(s) and memory values
// are updated.
// CONA_OK_UPDATED: Structure is updated, unknown reason.
// This value is optional and can be used with other values.
// The next values must be used one at a time:
// CONA_GET_FOLDER_INFO
// CONA_GET_FOLDER_CONTENT
// CONA_GET_FOLDER_AND_SUB_FOLDERS_CONTENT
// pstrFolderName [in] Name of target folder or drive. This value
// can be NULL. If target folder is device抯 root folder, value
// must include an empty string or NULL and target (or the
// current folder) path must be 揬\
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -