PROJ_FILE_API

Objective-C

struct PROJ_FILE_API {}

Swift

struct PROJ_FILE_API

File API callbacks

  • Version of this structure. Should be set to 1 currently.

    Declaration

    Objective-C

    int version

    Swift

    var version: Int32
  • Open file. Return NULL if error

    Declaration

    Objective-C

    PROJ_FILE_HANDLE *(*open_cbk)(PJ_CONTEXT *, const char *, PROJ_OPEN_ACCESS,
                                  void *)

    Swift

    var open_cbk: ((OpaquePointer?, UnsafePointer<CChar>?, PROJ_OPEN_ACCESS, UnsafeMutableRawPointer?) -> OpaquePointer?)!
  • Read sizeBytes into buffer from current position and return number of * bytes read

    Declaration

    Objective-C

    size_t (*read_cbk)(PJ_CONTEXT *, PROJ_FILE_HANDLE *, void *, size_t, void *)

    Swift

    var read_cbk: ((OpaquePointer?, OpaquePointer?, UnsafeMutableRawPointer?, Int, UnsafeMutableRawPointer?) -> Int)!
  • Write sizeBytes into buffer from current position and return number of * bytes written

    Declaration

    Objective-C

    size_t (*write_cbk)(PJ_CONTEXT *, PROJ_FILE_HANDLE *, const void *, size_t,
                        void *)

    Swift

    var write_cbk: ((OpaquePointer?, OpaquePointer?, UnsafeRawPointer?, Int, UnsafeMutableRawPointer?) -> Int)!
  • Seek to offset using whence=SEEK_SET/SEEK_CUR/SEEK_END. Return TRUE in * case of success

    Declaration

    Objective-C

    int (*seek_cbk)(PJ_CONTEXT *, PROJ_FILE_HANDLE *, long long, int, void *)

    Swift

    var seek_cbk: ((OpaquePointer?, OpaquePointer?, Int64, Int32, UnsafeMutableRawPointer?) -> Int32)!
  • Return current file position

    Declaration

    Objective-C

    unsigned long long (*tell_cbk)(PJ_CONTEXT *, PROJ_FILE_HANDLE *, void *)

    Swift

    var tell_cbk: ((OpaquePointer?, OpaquePointer?, UnsafeMutableRawPointer?) -> UInt64)!
  • Close file

    Declaration

    Objective-C

    void (*close_cbk)(PJ_CONTEXT *, PROJ_FILE_HANDLE *, void *)

    Swift

    var close_cbk: ((OpaquePointer?, OpaquePointer?, UnsafeMutableRawPointer?) -> Void)!
  • Return TRUE if a file exists

    Declaration

    Objective-C

    int (*exists_cbk)(PJ_CONTEXT *, const char *, void *)

    Swift

    var exists_cbk: ((OpaquePointer?, UnsafePointer<CChar>?, UnsafeMutableRawPointer?) -> Int32)!
  • Return TRUE if directory exists or could be created

    Declaration

    Objective-C

    int (*mkdir_cbk)(PJ_CONTEXT *, const char *, void *)

    Swift

    var mkdir_cbk: ((OpaquePointer?, UnsafePointer<CChar>?, UnsafeMutableRawPointer?) -> Int32)!
  • Return TRUE if file could be removed

    Declaration

    Objective-C

    int (*unlink_cbk)(PJ_CONTEXT *, const char *, void *)

    Swift

    var unlink_cbk: ((OpaquePointer?, UnsafePointer<CChar>?, UnsafeMutableRawPointer?) -> Int32)!
  • Return TRUE if file could be renamed

    Declaration

    Objective-C

    int (*rename_cbk)(PJ_CONTEXT *, const char *, const char *, void *)

    Swift

    var rename_cbk: ((OpaquePointer?, UnsafePointer<CChar>?, UnsafePointer<CChar>?, UnsafeMutableRawPointer?) -> Int32)!