StuBS
|
#include "fs/tool/util.h"
#include <algorithm>
#include <utility>
#include <iterator>
#include <iostream>
#include <sstream>
#include <cstring>
#include <cerrno>
#include "fs/tool/fs_image.h"
#include "fs/tool/fs_host.h"
#include "fs/tool/imagefile.h"
Macros | |
#define | count(X) (sizeof(X)/sizeof(X[0])) |
#define | PATH_MAX 4096 |
Functions | |
static std::string | combinepath (const std::string &dir, const std::string &name) |
bool | imageload (std::string path) |
bool | imagesync () |
bool | imageclose () |
std::string | imagename () |
std::string | basename (std::string const &path) |
std::string | dirname (std::string const &path) |
std::string | join (const std::vector< std::string > &vec, const char *delim) |
bool | checkError (FileSystemInterface *const fs, int e) |
bool | printError (int e) |
std::string | getcwd (FileSystemInterface *const fs) |
std::string | readlink (FileSystemInterface *const fs, std::string symlink) |
static bool | recursive (FileSystemInterface *const fs, const std::string &path, FileSystemInterface::FileType type, const std::function< bool(const std::string &, const FileSystemInterface::FileType &)> callback) |
bool | recursive (FileSystemInterface *const fs, const std::string &path, const std::function< bool(const std::string &, const FileSystemInterface::FileType &)> callback) |
std::string | filesize (unsigned long size, bool showBytes) |
static bool | listFile (FileSystemInterface *const fs, const std::string &path, const std::string &name, unsigned recursive) |
static bool | listDir (FileSystemInterface *const fs, const std::string &path, unsigned recursive) |
bool | list (FileSystemInterface *const fs, const std::string &path, bool recursive) |
bool | stat (FileSystemInterface *const fs, const std::string &path) |
bool | cat (FileSystemInterface *const fs, const std::string &path) |
bool | transfer (FileSystemInterface *const source, FileSystemInterface *const target, const std::string &path_source, std::string path_target, bool targetAsDir) |
Constants | |
FileSystemImage | image |
FileSystemHost | host |
static ImageFile | file |
#define count | ( | X | ) | (sizeof(X)/sizeof(X[0])) |
#define PATH_MAX 4096 |
|
static |
bool imageload | ( | std::string | path | ) |
bool imagesync | ( | ) |
bool imageclose | ( | ) |
std::string imagename | ( | ) |
std::string basename | ( | std::string const & | path | ) |
std::string dirname | ( | std::string const & | path | ) |
std::string join | ( | const std::vector< std::string > & | vec, |
const char * | delim | ||
) |
bool checkError | ( | FileSystemInterface *const | fs, |
int | e | ||
) |
bool printError | ( | int | e | ) |
std::string getcwd | ( | FileSystemInterface *const | fs | ) |
std::string readlink | ( | FileSystemInterface *const | fs, |
std::string | symlink | ||
) |
|
static |
bool recursive | ( | FileSystemInterface *const | fs, |
const std::string & | path, | ||
const std::function< bool(const std::string &, const FileSystemInterface::FileType &)> | callback | ||
) |
std::string filesize | ( | unsigned long | size, |
bool | showBytes | ||
) |
|
static |
|
static |
bool list | ( | FileSystemInterface *const | fs, |
const std::string & | path, | ||
bool | recursive | ||
) |
bool stat | ( | FileSystemInterface *const | fs, |
const std::string & | path | ||
) |
bool cat | ( | FileSystemInterface *const | fs, |
const std::string & | path | ||
) |
bool transfer | ( | FileSystemInterface *const | source, |
FileSystemInterface *const | target, | ||
const std::string & | path_source, | ||
std::string | path_target, | ||
bool | targetAsDir | ||
) |
|
extern |
|
extern |
|
static |