Back to index

avfs  1.0.1
Classes | Functions
realfile.h File Reference
#include "avfs.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  realfile

Functions

int av_get_realfile (ventry *ve, struct realfile **resp)

Class Documentation

struct realfile

Definition at line 11 of file realfile.h.

Class Members
int is_tmp
char * name

Function Documentation

int av_get_realfile ( ventry *  ve,
struct realfile **  resp 
)

Definition at line 81 of file realfile.c.

{
    int res;
    struct realfile *rf;

    AV_NEW_OBJ(rf, realfile_delete);
    rf->is_tmp = 0;
    rf->name = NULL;

    if(ve->mnt->base == NULL) {
        rf->name = av_strdup((char *) ve->data);
        rf->is_tmp = 0;

        *resp = rf;
        return 0;
    }

    res = av_get_tmpfile(&rf->name);
    if(res < 0) {
        av_unref_obj(rf);
        return res;
    }

    rf->is_tmp = 1;

    res = copy_file(ve, rf->name);
    if(res < 0) {
        av_unref_obj(rf);
        return res;
    }

    *resp = rf;
    return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function: