Hermes
file_system.h File Reference

Filesystem utils. More...

Go to the source code of this file.

Classes

class  hermes::Path
 Representation of a directory/file in the filesystem. More...
 
class  hermes::FileSystem
 Set of useful functions to manipulate files and directories. More...
 

Enumerations

enum class  hermes::ls_options {
  none = 0x0 , sort = 0x1 , reverse_sort = 0x2 , directories = 0x4 ,
  files = 0x8 , group_directories_first = 0x10 , recursive = 0x20
}
 List of options for ls the method. More...
 
enum class  hermes::find_options { none = 0x0 , recursive = 0x1 , sort = 0x2 }
 list of options for find the method More...
 

Functions

 hermes::HERMES_ENABLE_BITMASK_OPERATORS (ls_options)
 
 hermes::HERMES_ENABLE_BITMASK_OPERATORS (find_options)
 
std::ostream & hermes::operator<< (std::ostream &o, const Path &path)
 Path's << operator support for std::ostream More...
 

Detailed Description

Filesystem utils.

Copyright (c) 2020, FilipeCN.

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Author
FilipeCN (filip.nosp@m.edec.nosp@m.n@gma.nosp@m.il.c.nosp@m.om)
Date
2020-10-07

Enumeration Type Documentation

◆ find_options

enum hermes::find_options
strong

list of options for find the method

Enumerator
none 

default behaviour

recursive 

searches recursively in directories

sort 

sort results in lexicographical order

◆ ls_options

enum hermes::ls_options
strong

List of options for ls the method.

Enumerator
none 

default behaviour

sort 

sorts results in lexicographical order

reverse_sort 

sorts in reverse order

directories 

list only directories

files 

list only files

group_directories_first 

list directories first

recursive 

list recursively

Function Documentation

◆ operator<<()

std::ostream & hermes::operator<< ( std::ostream &  o,
const Path path 
)

Path's << operator support for std::ostream

Parameters
o
path
Returns