X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FLibrary%2FFileHandleLib.h;h=055177348186a3a27549f4c135ef1373934f1534;hp=bfcf8a4ee3f997169780d471f9d05eace5988e27;hb=9095d37b8fe5bfc3d02adad6ba7fd7359ebc0107;hpb=b269f8956321c598e13c55881d6f8f021bae1829 diff --git a/MdePkg/Include/Library/FileHandleLib.h b/MdePkg/Include/Library/FileHandleLib.h index bfcf8a4ee3..0551773481 100644 --- a/MdePkg/Include/Library/FileHandleLib.h +++ b/MdePkg/Include/Library/FileHandleLib.h @@ -1,7 +1,7 @@ /** @file Provides interface to EFI_FILE_HANDLE functionality. - Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -16,6 +16,7 @@ #define _FILE_HANDLE_LIBRARY_HEADER_ #include +#include /// The tag for use in identifying UNICODE files. /// If the file is UNICODE, the first 16 bits of the file will equal this value. @@ -184,9 +185,9 @@ FileHandleDelete ( has the effect of starting the read process of the directory entries over again. @param[in] FileHandle The file handle on which the position is being set. - @param[in] Position The byte position from the begining of the file. + @param[in] Position The byte position from the beginning of the file. - @retval EFI_SUCCESS The operation completed sucessfully. + @retval EFI_SUCCESS The operation completed successfully. @retval EFI_UNSUPPORTED The request for non-zero is not valid on directories. @retval INVALID_PARAMETER One of the parameters has an invalid value. @@ -207,7 +208,7 @@ FileHandleSetPosition ( if FileHandle is a directory. @param[in] FileHandle The open file handle on which to get the position. - @param[out] Position The byte position from begining of file. + @param[out] Position The byte position from beginning of file. @retval EFI_SUCCESS The operation completed successfully. @retval INVALID_PARAMETER One of the parameters has an invalid value. @@ -248,8 +249,8 @@ FileHandleFlush ( @param[in] DirHandle Handle to open file. @retval EFI_SUCCESS DirHandle is a directory. - @retval EFI_INVALID_PARAMETER DirHandle is NULL. - The file information returns from FileHandleGetInfo is NULL. + @retval EFI_INVALID_PARAMETER DirHandle is NULL. + The file information returns from FileHandleGetInfo is NULL. @retval EFI_NOT_FOUND DirHandle is not a directory. **/ EFI_STATUS @@ -322,7 +323,7 @@ FileHandleFindNextFile( @param[in] FileHandle The file handle from which size is retrieved. @param[out] Size The pointer to size. - @retval EFI_SUCCESS Operation was completed sucessfully. + @retval EFI_SUCCESS Operation was completed successfully. @retval EFI_DEVICE_ERROR Cannot access the file. @retval EFI_INVALID_PARAMETER FileHandle is NULL. Size is NULL. @@ -356,7 +357,9 @@ FileHandleSetSize ( /** Function to get a full filename given a EFI_FILE_HANDLE somewhere lower on the - directory 'stack'. + directory 'stack'. If the file is a directory, then append the '\' char at the + end of name string. If it's not a directory, then the last '\' should not be + added. @param[in] Handle Handle to the Directory or File to create path to. @param[out] FullFileName Pointer to pointer to generated full file name. It @@ -379,6 +382,8 @@ FileHandleGetFileName ( If the position upon start is 0, then the Ascii Boolean will be set. This should be maintained and not changed for all operations with the same file. + The function will not return the \r and \n character in buffer. When an empty line is + read a CHAR_NULL character will be returned in buffer. @param[in] Handle FileHandle to read from. @param[in, out] Buffer The pointer to buffer to read into. @@ -433,7 +438,13 @@ FileHandleReturnLine( ); /** - Function to write a line of unicode text to a file. + Function to write a line of text to a file. + + If the file is a Unicode file (with UNICODE file tag) then write the unicode + text. + If the file is an ASCII file then write the ASCII text. + If the size of file is zero (without file tag at the beginning) then write + ASCII text as default. @param[in] Handle FileHandle to write to. @param[in] Buffer Buffer to write, if NULL the function will @@ -442,6 +453,8 @@ FileHandleReturnLine( @retval EFI_SUCCESS The data was written. Buffer is NULL. @retval EFI_INVALID_PARAMETER Handle is NULL. + @retval EFI_OUT_OF_RESOURCES Unable to allocate temporary space for ASCII + string due to out of resources. @sa FileHandleWrite **/