#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <unistd.h>#include <dirent.h>#include <cerrno>#include <iosfwd>#include <list>#include <set>#include <map>#include "zypp/Pathname.h"#include "zypp/CheckSum.h"#include "zypp/ByteCount.h"Go to the source code of this file.
Namespaces | |
| namespace | zypp |
| namespace | zypp::filesystem |
Classes | |
| class | zypp::filesystem::StatMode |
| class | zypp::filesystem::DevInoCache |
| Simple cache remembering device/inode to detect hardlinks. More... | |
| class | zypp::filesystem::PathInfo |
| Wrapper class for stat/lstat. More... | |
| struct | zypp::filesystem::DirEntry |
| Listentry returned by readdir. More... | |
Misc. | |
| enum | zypp::filesystem::ZIP_TYPE { zypp::filesystem::ZT_NONE, zypp::filesystem::ZT_GZ, zypp::filesystem::ZT_BZ2 } |
| Test whether a file is compressed (gzip/bzip2). More... | |
| ZIP_TYPE | zypp::filesystem::zipType (const Pathname &file) |
| int | zypp::filesystem::erase (const Pathname &path) |
| Erase whatever happens to be located at path (file or directory). | |
| ByteCount | zypp::filesystem::df (const Pathname &path) |
| Report free disk space on a mounted file system. | |
| mode_t | zypp::filesystem::getUmask () |
| Get the current umask (file mode creation mask). | |
| mode_t | zypp::filesystem::applyUmaskTo (mode_t mode_r) |
Modify mode_r according to the current umask ( mode_r & ~getUmask() ). | |
Directory related functions. | |
| typedef std::list < DirEntry > | zypp::filesystem::DirContent |
| Returned by readdir. | |
| int | zypp::filesystem::mkdir (const Pathname &path, unsigned mode=0755) |
| Like 'mkdir'. | |
| int | zypp::filesystem::assert_dir (const Pathname &path, unsigned mode=0755) |
| Like 'mkdir -p'. | |
| int | zypp::filesystem::rmdir (const Pathname &path) |
| Like 'rmdir'. | |
| int | zypp::filesystem::recursive_rmdir (const Pathname &path) |
| Like 'rm -r DIR'. | |
| int | zypp::filesystem::clean_dir (const Pathname &path) |
| Like 'rm -r DIR/ *'. | |
| int | zypp::filesystem::copy_dir (const Pathname &srcpath, const Pathname &destpath) |
| Like 'cp -a srcpath destpath'. | |
| int | zypp::filesystem::copy_dir_content (const Pathname &srcpath, const Pathname &destpath) |
| Like 'cp -a srcpath/. | |
| int | zypp::filesystem::readdir (std::list< std::string > &retlist, const Pathname &path, bool dots=true) |
| Return content of directory via retlist. | |
| int | zypp::filesystem::readdir (std::list< Pathname > &retlist, const Pathname &path, bool dots=true) |
| Return content of directory via retlist. | |
| int | zypp::filesystem::readdir (DirContent &retlist, const Pathname &path, bool dots=true, PathInfo::Mode statmode=PathInfo::STAT) |
| Return content of directory via retlist. | |
| int | zypp::filesystem::is_empty_dir (const Pathname &path) |
| Check if the specified directory is empty. | |
Enumerations | |
| enum | zypp::filesystem::FileType { zypp::filesystem::FT_NOT_AVAIL = 0x00, zypp::filesystem::FT_NOT_EXIST = 0x01, zypp::filesystem::FT_FILE = 0x02, zypp::filesystem::FT_DIR = 0x04, zypp::filesystem::FT_CHARDEV = 0x08, zypp::filesystem::FT_BLOCKDEV = 0x10, zypp::filesystem::FT_FIFO = 0x20, zypp::filesystem::FT_LINK = 0x40, zypp::filesystem::FT_SOCKET = 0x80 } |
| File type information. More... | |
Functions | |
| std::string | zypp::filesystem::checksum (const Pathname &file, const std::string &algorithm) |
| Compute a files checksum. | |
| bool | zypp::filesystem::is_checksum (const Pathname &file, const CheckSum &checksum) |
| check files checksum | |
File related functions. | |
| int | zypp::filesystem::touch (const Pathname &path) |
| Change file's modification and access times. | |
| int | zypp::filesystem::unlink (const Pathname &path) |
| Like 'unlink'. | |
| int | zypp::filesystem::rename (const Pathname &oldpath, const Pathname &newpath) |
| Like 'rename'. | |
| int | zypp::filesystem::copy (const Pathname &file, const Pathname &dest) |
| Like 'cp file dest'. | |
| int | zypp::filesystem::symlink (const Pathname &oldpath, const Pathname &newpath) |
| Like 'symlink'. | |
| int | zypp::filesystem::hardlink (const Pathname &oldpath, const Pathname &newpath) |
| Like 'link'. | |
| int | zypp::filesystem::copy_file2dir (const Pathname &file, const Pathname &dest) |
| Like 'cp file dest'. | |
Digest computaion. | |
| std::string | zypp::filesystem::md5sum (const Pathname &file) |
| Compute a files md5sum. | |
| std::string | zypp::filesystem::sha1sum (const Pathname &file) |
| Compute a files sha1sum. | |
Changing permissions. | |
| int | zypp::filesystem::chmod (const Pathname &path, mode_t mode) |
| Like 'chmod'. | |
Definition in file PathInfo.h.
1.5.3