preproc_ifdef
#ifndef "#ifndef"
identifier "AWS_COMMON_FILE_H"
preproc_def
#define "#define"
identifier "AWS_COMMON_FILE_H"
comment "/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rig"...
preproc_include
#include "#include"
system_lib_string "<aws/common/byte_buf.h>"
preproc_include
#include "#include"
system_lib_string "<aws/common/common.h>"
preproc_include
#include "#include"
system_lib_string "<aws/common/platform.h>"
preproc_include
#include "#include"
system_lib_string "<stdio.h>"
type_identifier "AWS_PUSH_SANE_WARNING_LEVEL"
; ""
preproc_ifdef (+22 nodes collapsed)
struct_specifier
struct "struct"
type_identifier "aws_string"
; ";"
struct_specifier
struct "struct"
type_identifier "aws_directory_iterator"
; ";"
enum_specifier (+21 nodes collapsed)
; ";"
struct_specifier (+30 nodes collapsed)
; ";"
comment "/**\n * Invoked during calls to aws_directory_traverse() as a"...
type_definition (+27 nodes collapsed)
declaration
type_identifier "AWS_EXTERN_C_BEGIN"
comment "/**\n * Deprecated - Use aws_fopen_safe() instead, avoid cons"...
identifier "AWS_COMMON_API"
; ""
declaration (+25 nodes collapsed)
comment "/**\n * Opens file at file_path using mode. Returns the FILE "...
declaration (+31 nodes collapsed)
comment "/**\n * Creates a directory if it doesn't currently exist. If"...
declaration
type_identifier "AWS_COMMON_API"
ERROR
identifier "int"
function_declarator
identifier "aws_directory_create"
parameter_list
( "("
parameter_declaration
type_qualifier
const "const"
struct_specifier
struct "struct"
type_identifier "aws_string"
pointer_declarator
* "*"
identifier "dir_path"
) ")"
; ";"
comment "/**\n * Returns true if the directory currently exists. Other"...
declaration
type_identifier "AWS_COMMON_API"
ERROR
identifier "bool"
function_declarator
identifier "aws_directory_exists"
parameter_list
( "("
parameter_declaration
type_qualifier
const "const"
struct_specifier
struct "struct"
type_identifier "aws_string"
pointer_declarator
* "*"
identifier "dir_path"
) ")"
; ";"
comment "/**\n * Deletes a directory. If the directory is not empty, t"...
declaration (+23 nodes collapsed)
comment "/**\n * Deletes a file. Returns AWS_OP_SUCCESS if the operati"...
declaration
type_identifier "AWS_COMMON_API"
ERROR
identifier "int"
function_declarator
identifier "aws_file_delete"
parameter_list
( "("
parameter_declaration
type_qualifier
const "const"
struct_specifier
struct "struct"
type_identifier "aws_string"
pointer_declarator
* "*"
identifier "file_path"
) ")"
; ";"
comment "/**\n * Moves directory at from to to.\n * Returns AWS_OP_SUCC"...
declaration (+29 nodes collapsed)
comment "/**\n * Traverse a directory starting at path.\n *\n * If you w"...
declaration (+43 nodes collapsed)
comment "/**\n * Creates a read-only iterator of a directory starting "...
declaration
type_identifier "AWS_COMMON_API"
identifier "struct"
; ""
declaration (+27 nodes collapsed)
comment "/**\n * Moves the iterator to the next entry. Returns AWS_OP_"...
declaration
type_identifier "AWS_COMMON_API"
ERROR
identifier "int"
function_declarator
identifier "aws_directory_entry_iterator_next"
parameter_list
( "("
parameter_declaration
struct_specifier
struct "struct"
type_identifier "aws_directory_iterator"
pointer_declarator
* "*"
identifier "iterator"
) ")"
; ";"
comment "/**\n * Moves the iterator to the previous entry. Returns AWS"...
declaration
type_identifier "AWS_COMMON_API"
ERROR
identifier "int"
function_declarator
identifier "aws_directory_entry_iterator_previous"
parameter_list
( "("
parameter_declaration
struct_specifier
struct "struct"
type_identifier "aws_directory_iterator"
pointer_declarator
* "*"
identifier "iterator"
) ")"
; ";"
comment "/**\n * Cleanup and deallocate iterator\n */"
declaration
type_identifier "AWS_COMMON_API"
ERROR
identifier "void"
function_declarator
identifier "aws_directory_entry_iterator_destroy"
parameter_list
( "("
parameter_declaration
struct_specifier
struct "struct"
type_identifier "aws_directory_iterator"
pointer_declarator
* "*"
identifier "iterator"
) ")"
; ";"
comment "/**\n * Gets the aws_directory_entry value for iterator at th"...
declaration
type_identifier "AWS_COMMON_API"
type_qualifier
const "const"
identifier "struct"
; ""
declaration
type_identifier "aws_directory_entry"
pointer_declarator
* "*"
function_declarator
identifier "aws_directory_entry_iterator_get_value"
parameter_list
( "("
parameter_declaration
type_qualifier
const "const"
struct_specifier
struct "struct"
type_identifier "aws_directory_iterator"
pointer_declarator
* "*"
identifier "iterator"
) ")"
; ";"
comment "/**\n * Returns true iff the character is a directory separat"...
declaration
type_identifier "AWS_COMMON_API"
ERROR
identifier "bool"
function_declarator
identifier "aws_is_any_directory_separator"
parameter_list
( "("
parameter_declaration
primitive_type "char"
identifier "value"
) ")"
; ";"
comment "/**\n * Returns the directory separator used by the local pla"...
declaration
type_identifier "AWS_COMMON_API"
ERROR
identifier "char"
function_declarator
identifier "aws_get_platform_directory_separator"
parameter_list
( "("
parameter_declaration
primitive_type "void"
) ")"
; ";"
comment "/**\n * Normalizes the path by replacing any directory separa"...
declaration
type_identifier "AWS_COMMON_API"
ERROR
identifier "void"
function_declarator
identifier "aws_normalize_directory_separator"
parameter_list
( "("
parameter_declaration
struct_specifier
struct "struct"
type_identifier "aws_byte_buf"
pointer_declarator
* "*"
identifier "path"
) ")"
; ";"
comment "/**\n * Returns the current user's home directory.\n */"
declaration
type_identifier "AWS_COMMON_API"
identifier "struct"
; ""
declaration
type_identifier "aws_string"
pointer_declarator
* "*"
function_declarator
identifier "aws_get_home_directory"
parameter_list
( "("
parameter_declaration
struct_specifier
struct "struct"
type_identifier "aws_allocator"
pointer_declarator
* "*"
identifier "allocator"
) ")"
; ";"
comment "/**\n * Returns true if a file or path exists, otherwise, fal"...
declaration
type_identifier "AWS_COMMON_API"
ERROR
identifier "bool"
function_declarator
identifier "aws_path_exists"
parameter_list
( "("
parameter_declaration
type_qualifier
const "const"
struct_specifier
struct "struct"
type_identifier "aws_string"
pointer_declarator
* "*"
identifier "path"
) ")"
; ";"
comment "/*\n * Wrapper for highest-resolution platform-dependent seek"...
declaration (+23 nodes collapsed)
comment "/*\n * Wrapper for os-specific file length query. We can't u"...
declaration (+21 nodes collapsed)
comment "/*\n * Read from the file using the file path with DIRECT I/O"...
declaration
type_identifier "AWS_COMMON_API"
ERROR
identifier "int"
function_declarator
identifier "aws_file_path_read_from_offset_direct_io"
parameter_list
( "("
parameter_declaration
type_qualifier
const "const"
struct_specifier
struct "struct"
type_identifier "aws_string"
pointer_declarator
* "*"
identifier "file_path"
, ","
parameter_declaration
primitive_type "uint64_t"
identifier "offset"
, ","
parameter_declaration
primitive_type "size_t"
identifier "max_read_length"
, ","
parameter_declaration
struct_specifier
struct "struct"
type_identifier "aws_byte_buf"
pointer_declarator
* "*"
identifier "output_buf"
, ","
parameter_declaration
primitive_type "size_t"
pointer_declarator
* "*"
identifier "out_actual_read"
) ")"
; ";"
comment "/*\n * Read from the file using the file path, starting at of"...
declaration
type_identifier "AWS_COMMON_API"
ERROR
identifier "int"
function_declarator
identifier "aws_file_path_read_from_offset"
parameter_list
( "("
parameter_declaration
type_qualifier
const "const"
struct_specifier
struct "struct"
type_identifier "aws_string"
pointer_declarator
* "*"
identifier "file_path"
, ","
parameter_declaration
primitive_type "uint64_t"
identifier "offset"
, ","
parameter_declaration
primitive_type "size_t"
identifier "max_read_length"
, ","
parameter_declaration
struct_specifier
struct "struct"
type_identifier "aws_byte_buf"
pointer_declarator
* "*"
identifier "output_buf"
, ","
parameter_declaration
primitive_type "size_t"
pointer_declarator
* "*"
identifier "out_actual_read"
) ")"
; ";"
comment "/*\n * The function serve the same purpose as `aws_file_path_"...
declaration
type_identifier "AWS_COMMON_API"
ERROR
identifier "int"
function_declarator
identifier "aws_file_path_read_from_offset_direct_io_with_chunk_size"
parameter_list
( "("
parameter_declaration
type_qualifier
const "const"
struct_specifier
struct "struct"
type_identifier "aws_string"
pointer_declarator
* "*"
identifier "file_path"
, ","
parameter_declaration
primitive_type "uint64_t"
identifier "offset"
, ","
parameter_declaration
primitive_type "size_t"
identifier "max_read_length"
, ","
parameter_declaration
primitive_type "size_t"
identifier "max_chunk_size"
, ","
parameter_declaration
struct_specifier
struct "struct"
type_identifier "aws_byte_buf"
pointer_declarator
* "*"
identifier "output_buf"
, ","
parameter_declaration
primitive_type "size_t"
pointer_declarator
* "*"
identifier "out_actual_read"
) ")"
; ";"
declaration
type_identifier "AWS_EXTERN_C_END"
identifier "AWS_POP_SANE_WARNING_LEVEL"
; ""
#endif "#endif"