Debian Codegraph @

src/uk/me/parabola/imgfmt/sys/FileLink.java

raw symbols SCIP
1 /*
2 * Copyright (C) 2018.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 or
6 * version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
12 */
13 package uk.me.parabola.imgfmt.sys;
14
15 import java.io.Closeable;
16
17 import uk.me.parabola.imgfmt.Sized;
18
19 /**
20 * Allow an ImgWriter to link into the FileNode.
21 *
22 * When writing a file in ImgFS.close() we need the actual sizes of the files
23 * before they are written to the real file in order to calculate the directory
24 * size.
25 */
26 public interface FileLink {
27
28 /**
29 * A buffering ImgWriter can supply methods to the FileNode to obtain its
30 * size and access to its sync() routine.
31 */
32 public void link(Sized sized, Closeable closeable);
33 }