Add API to get the size of a file node.

release-1.5.4.branch
Vreixo Formoso 15 years ago
parent ba681a2601
commit ad65cc4d45
  1. 5
      src/libisofs.h
  2. 8
      src/node.c

@ -843,6 +843,11 @@ void iso_node_set_sort_weight(IsoNode *node, int w);
*/
int iso_file_get_sort_weight(IsoFile *file);
/**
* Get the size of the file, in bytes
*/
off_t iso_file_get_size(IsoFile *file);
/**
* Add a new directory to the iso tree. Permissions, owner and hidden atts
* are taken from parent, you can modify them later.

@ -591,6 +591,14 @@ int iso_file_get_sort_weight(IsoFile *file)
return file->sort_weight;
}
/**
* Get the size of the file, in bytes
*/
off_t iso_file_get_size(IsoFile *file)
{
return iso_stream_get_size(file->stream);
}
/**
* Check if a given name is valid for an iso node.
*

Loading…
Cancel
Save