core: Move pack file parsing into core, add ostree_create_file_from_input() API
This moves us closer to consistently passing around a triple of: (GFileInfo *info, GVariant *xattrs, GInputStream *content) Which will help the libarchive work.
This commit is contained in:
1 parent
f98e2a2ddb
commit
7fc625c967
6 files changed
+227
-308
No files matched your search
@@ -34,6 +34,19 @@
|
||||
#define O_BINARY 0
|
||||
#endif
|
||||
|
||||
GFileType
|
||||
ot_gfile_type_for_mode (guint32 mode)
|
||||
{
|
||||
if (S_ISREG (mode))
|
||||
return G_FILE_TYPE_REGULAR;
|
||||
else if (S_ISLNK (mode))
|
||||
return G_FILE_TYPE_SYMBOLIC_LINK;
|
||||
else if (S_ISBLK (mode) || S_ISCHR(mode) || S_ISFIFO(mode))
|
||||
return G_FILE_TYPE_SPECIAL;
|
||||
else
|
||||
return G_FILE_TYPE_UNKNOWN;
|
||||
}
|
||||
|
||||
gboolean
|
||||
ot_gfile_ensure_directory (GFile *dir,
|
||||
gboolean with_parents,
|
||||
|
||||
Reference in new issue
Block a user