• 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 android.system;
18 
19 import libcore.util.Objects;
20 
21 /**
22  * File information returned by {@link Os#fstatvfs} and {@link Os#statvfs}.
23  */
24 public final class StructStatVfs {
25   /** File system block size (used for block counts). */
26   public final long f_bsize; /*unsigned long*/
27 
28   /** Fundamental file system block size. */
29   public final long f_frsize; /*unsigned long*/
30 
31   /** Total block count. */
32   public final long f_blocks; /*fsblkcnt_t*/
33 
34   /** Free block count. */
35   public final long f_bfree; /*fsblkcnt_t*/
36 
37   /** Free block count available to non-root. */
38   public final long f_bavail; /*fsblkcnt_t*/
39 
40   /** Total file (inode) count. */
41   public final long f_files; /*fsfilcnt_t*/
42 
43   /** Free file (inode) count. */
44   public final long f_ffree; /*fsfilcnt_t*/
45 
46   /** Free file (inode) count available to non-root. */
47   public final long f_favail; /*fsfilcnt_t*/
48 
49   /** File system id. */
50   public final long f_fsid; /*unsigned long*/
51 
52   /** Bit mask of ST_* flags. */
53   public final long f_flag; /*unsigned long*/
54 
55   /** Maximum filename length. */
56   public final long f_namemax; /*unsigned long*/
57 
58   /**
59    * Constructs an instance with the given field values.
60    */
StructStatVfs(long f_bsize, long f_frsize, long f_blocks, long f_bfree, long f_bavail, long f_files, long f_ffree, long f_favail, long f_fsid, long f_flag, long f_namemax)61   public StructStatVfs(long f_bsize, long f_frsize, long f_blocks, long f_bfree, long f_bavail,
62                 long f_files, long f_ffree, long f_favail,
63                 long f_fsid, long f_flag, long f_namemax) {
64     this.f_bsize = f_bsize;
65     this.f_frsize = f_frsize;
66     this.f_blocks = f_blocks;
67     this.f_bfree = f_bfree;
68     this.f_bavail = f_bavail;
69     this.f_files = f_files;
70     this.f_ffree = f_ffree;
71     this.f_favail = f_favail;
72     this.f_fsid = f_fsid;
73     this.f_flag = f_flag;
74     this.f_namemax = f_namemax;
75   }
76 
toString()77   @Override public String toString() {
78     return Objects.toString(this);
79   }
80 }
81