jaulib v1.2.0
Jau Support Library (C++, Java, ..)
Classes | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
org.jau.fs.FMode Class Reference

Generic file type and POSIX protection mode bits as used in file_stats, touch(), mkdir() etc. More...

Collaboration diagram for org.jau.fs.FMode:

Classes

enum  Bit
 

Public Member Functions

 FMode (final int v)
 
 FMode ()
 
boolean isSet (final Bit bit)
 
FMode set (final Bit bit)
 Sets the given bit and returns this instance for chaining. More...
 
FMode mask (final int bits)
 
String toString ()
 
String toString (final boolean show_rwx)
 
boolean equals (final Object other)
 

Public Attributes

int mask
 

Static Public Attributes

static final FMode def_dir = new FMode(FMode.Bit.def_dir_prot.value)
 Default directory protection bit: Safe default: POSIX S_IRWXU | S_IRGRP | S_IXGRP or rwx_usr | read_grp | exec_grp. More...
 
static final FMode def_file = new FMode(FMode.Bit.def_file_prot.value)
 Default file protection bit: Safe default: POSIX S_IRUSR | S_IWUSR | S_IRGRP or read_usr | write_usr | read_grp. More...
 

Detailed Description

Generic file type and POSIX protection mode bits as used in file_stats, touch(), mkdir() etc.

The POSIX protection mode bits reside in the lower 16-bits and are bit-wise POSIX compliant while the file type bits reside in the upper 16-bits and are platform agnostic.

This enum class type fulfills C++ named requirements: BitmaskType.

See also
FileStats
FileStats::mode()

Definition at line 37 of file FMode.java.

Constructor & Destructor Documentation

◆ FMode() [1/2]

org.jau.fs.FMode.FMode ( final int  v)

Definition at line 116 of file FMode.java.

◆ FMode() [2/2]

org.jau.fs.FMode.FMode ( )

Definition at line 119 of file FMode.java.

Here is the caller graph for this function:

Member Function Documentation

◆ equals()

boolean org.jau.fs.FMode.equals ( final Object  other)

Definition at line 149 of file FMode.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isSet()

boolean org.jau.fs.FMode.isSet ( final Bit  bit)

Definition at line 123 of file FMode.java.

Here is the caller graph for this function:

◆ mask()

FMode org.jau.fs.FMode.mask ( final int  bits)

Definition at line 132 of file FMode.java.

Here is the call graph for this function:

◆ set()

FMode org.jau.fs.FMode.set ( final Bit  bit)

Sets the given bit and returns this instance for chaining.

Parameters
bitthe given Bit value to set
Returns
this instance for chaining.

Definition at line 130 of file FMode.java.

Here is the caller graph for this function:

◆ toString() [1/2]

String org.jau.fs.FMode.toString ( )

Definition at line 141 of file FMode.java.

◆ toString() [2/2]

String org.jau.fs.FMode.toString ( final boolean  show_rwx)

Definition at line 144 of file FMode.java.

Member Data Documentation

◆ def_dir

final FMode org.jau.fs.FMode.def_dir = new FMode(FMode.Bit.def_dir_prot.value)
static

Default directory protection bit: Safe default: POSIX S_IRWXU | S_IRGRP | S_IXGRP or rwx_usr | read_grp | exec_grp.

Definition at line 158 of file FMode.java.

◆ def_file

final FMode org.jau.fs.FMode.def_file = new FMode(FMode.Bit.def_file_prot.value)
static

Default file protection bit: Safe default: POSIX S_IRUSR | S_IWUSR | S_IRGRP or read_usr | write_usr | read_grp.

Definition at line 161 of file FMode.java.

◆ mask

int org.jau.fs.FMode.mask

Definition at line 114 of file FMode.java.


The documentation for this class was generated from the following file: