]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/FileHandleLib.h
MdePkg: fix comment typo in DebugLib.h
[mirror_edk2.git] / MdePkg / Include / Library / FileHandleLib.h
index ed4d636fdd54da47544aecc828bf515d142dfe86..00706f964dfd723d4d9a99157bc36e04476083d2 100644 (file)
@@ -316,17 +316,16 @@ FileHandleFindNextFile(
 /**\r
   Retrieve the size of a file.\r
 \r
-  If FileHandle is NULL then ASSERT().\r
-  If Size is NULL then ASSERT().\r
-\r
   This function extracts the file size info from the FileHandle's EFI_FILE_INFO\r
   data.\r
 \r
   @param[in] FileHandle         The file handle from which size is retrieved.\r
   @param[out] Size              The pointer to size.\r
 \r
-  @retval EFI_SUCCESS           The operation completed successfully.\r
+  @retval EFI_SUCCESS           Operation was completed sucessfully.\r
   @retval EFI_DEVICE_ERROR      Cannot access the file.\r
+  @retval EFI_INVALID_PARAMETER FileHandle is NULL.\r
+                                Size is NULL.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -338,8 +337,6 @@ FileHandleGetSize (
 /**\r
   Set the size of a file.\r
 \r
-  If FileHandle is NULL then ASSERT().\r
-\r
   This function changes the file size info from the FileHandle's EFI_FILE_INFO\r
   data.\r
 \r
@@ -348,6 +345,7 @@ FileHandleGetSize (
 \r
   @retval EFI_SUCCESS           The operation completed successfully.\r
   @retval EFI_DEVICE_ERROR      Cannot access the file.\r
+  @retval EFI_INVALID_PARAMETER FileHandle is NULL.\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -358,7 +356,9 @@ FileHandleSetSize (
 \r
 /**\r
   Function to get a full filename given a EFI_FILE_HANDLE somewhere lower on the\r
-  directory 'stack'.\r
+  directory 'stack'. If the file is a directory, then append the '\' char at the \r
+  end of name string. If it's not a directory, then the last '\' should not be \r
+  added.\r
 \r
   @param[in] Handle             Handle to the Directory or File to create path to.\r
   @param[out] FullFileName      Pointer to pointer to generated full file name.  It\r
@@ -381,6 +381,8 @@ FileHandleGetFileName (
 \r
   If the position upon start is 0, then the Ascii Boolean will be set.  This should be\r
   maintained and not changed for all operations with the same file.\r
+  The function will not return the \r and \n character in buffer. When an empty line is\r
+  read a CHAR_NULL character will be returned in buffer.\r
 \r
   @param[in]       Handle        FileHandle to read from.\r
   @param[in, out]  Buffer        The pointer to buffer to read into.\r
@@ -435,16 +437,23 @@ FileHandleReturnLine(
   );\r
 \r
 /**\r
-  Function to write a line of unicode text to a file.\r
-\r
-  If Handle is NULL, ASSERT.\r
+  Function to write a line of text to a file.\r
+  \r
+  If the file is a Unicode file (with UNICODE file tag) then write the unicode \r
+  text.\r
+  If the file is an ASCII file then write the ASCII text.\r
+  If the size of file is zero (without file tag at the beginning) then write \r
+  ASCII text as default.\r
 \r
   @param[in]     Handle         FileHandle to write to.\r
   @param[in]     Buffer         Buffer to write, if NULL the function will\r
                                 take no action and return EFI_SUCCESS.\r
 \r
-  @retval  EFI_SUCCESS          The data was written.\r
-  @retval  other                Failure.\r
+  @retval  EFI_SUCCESS            The data was written.\r
+                                  Buffer is NULL.\r
+  @retval  EFI_INVALID_PARAMETER  Handle is NULL.\r
+  @retval  EFI_OUT_OF_RESOURCES   Unable to allocate temporary space for ASCII \r
+                                  string due to out of resources.\r
 \r
   @sa FileHandleWrite\r
 **/\r