• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2011 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package libcore.io;
18 
19 /**
20  * File information returned by fstatfs(2) and statfs(2).
21  *
22  * TODO: this should be {@code struct statvfs}, but Bionic doesn't support that yet.
23  * @hide until the TODO is fixed.
24  */
25 public final class StructStatFs {
26     /** File system block size (used for block counts). */
27     public final long f_bsize; /*unsigned long*/
28 
29     /** Total block count. */
30     public final long f_blocks; /*fsblkcnt_t*/
31 
32     /** Free block count. */
33     public final long f_bfree; /*fsblkcnt_t*/
34 
35     /** Free block count available to non-root. */
36     public final long f_bavail; /*fsblkcnt_t*/
37 
38     /** Total file (inode) count. */
39     public final long f_files; /*fsfilcnt_t*/
40 
41     /** Free file (inode) count. */
42     public final long f_ffree; /*fsfilcnt_t*/
43 
44     /** Maximum filename length. */
45     public final long f_namemax; /*unsigned long*/
46 
47     /** Fundamental file system block size. */
48     public final long f_frsize; /*unsigned long*/
49 
StructStatFs(long f_bsize, long f_blocks, long f_bfree, long f_bavail, long f_files, long f_ffree, long f_namemax, long f_frsize)50     StructStatFs(long f_bsize, long f_blocks, long f_bfree, long f_bavail,
51             long f_files, long f_ffree, long f_namemax, long f_frsize) {
52         this.f_bsize = f_bsize;
53         this.f_blocks = f_blocks;
54         this.f_bfree = f_bfree;
55         this.f_bavail = f_bavail;
56         this.f_files = f_files;
57         this.f_ffree = f_ffree;
58         this.f_namemax = f_namemax;
59         this.f_frsize = f_frsize;
60     }
61 }
62