Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-02-26 10:01:42 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-02-26 10:01:42 +0300
commit5f83495e4c21d8c2297e9f15ac1a81657a992855 (patch)
tree37508c644072b4692961eec71f7ed81c72ab60fc /source/blender/blenlib/BLI_fileops.h
parent66af6e4f32148e254a3dc64e442b4b6f389259d8 (diff)
BLI_fileops: add utility to read text with newlines set to nil
Diffstat (limited to 'source/blender/blenlib/BLI_fileops.h')
-rw-r--r--source/blender/blenlib/BLI_fileops.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h
index 3ee22e4ad0a..74e6c32b288 100644
--- a/source/blender/blenlib/BLI_fileops.h
+++ b/source/blender/blenlib/BLI_fileops.h
@@ -158,6 +158,10 @@ bool BLI_file_older(const char *file1, const char *file2) ATTR_WARN_UNUSED_RESUL
/* read ascii file as lines, empty list if reading fails */
struct LinkNode *BLI_file_read_as_lines(const char *file) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
void *BLI_file_read_text_as_mem(const char *filepath, size_t pad_bytes, size_t *r_size);
+void *BLI_file_read_text_as_mem_with_newline_as_nil(const char *filepath,
+ bool trim_trailing_space,
+ size_t pad_bytes,
+ size_t *r_size);
void *BLI_file_read_binary_as_mem(const char *filepath, size_t pad_bytes, size_t *r_size);
void BLI_file_free_lines(struct LinkNode *lines);