Lucene++ - a full-featured, c++ search engine
API Documentation

Loading...
Searching...
No Matches
FileUtils.h
Go to the documentation of this file.
1
2// Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3// Distributable under the terms of either the Apache License (Version 2.0)
4// or the GNU Lesser General Public License.
6
7#ifndef FILEUTILS_H
8#define FILEUTILS_H
9
10#include "Lucene.h"
11
12 namespace Lucene {
13
14 namespace FileUtils {
15
17LPPAPI bool fileExists(const String& path);
18
20LPPAPI uint64_t fileModified(const String& path);
21
23LPPAPI bool touchFile(const String& path);
24
26LPPAPI int64_t fileLength(const String& path);
27
29LPPAPI bool setFileLength(const String& path, int64_t length);
30
32LPPAPI bool removeFile(const String& path);
33
35LPPAPI bool copyFile(const String& source, const String& dest);
36
38LPPAPI bool createDirectory(const String& path);
39
41LPPAPI bool removeDirectory(const String& path);
42
44LPPAPI bool isDirectory(const String& path);
45
50LPPAPI bool listDirectory(const String& path, bool filesOnly, HashSet<String> dirList);
51
53LPPAPI bool copyDirectory(const String& source, const String& dest);
54
56LPPAPI String joinPath(const String& path, const String& file);
57
59LPPAPI String extractPath(const String& path);
60
62LPPAPI String extractFile(const String& path);
63}
64
65}
66
67#endif
Lucene::HashSet
Utility template class to handle hash set collections that can be safely copied and shared.
Definition HashSet.h:17
Lucene::FileUtils::createDirectory
LPPAPI bool createDirectory(const String &path)
Create new directory under given location.
Lucene::FileUtils::setFileLength
LPPAPI bool setFileLength(const String &path, int64_t length)
Set new file length, truncating or expanding as required.
Lucene::FileUtils::copyDirectory
LPPAPI bool copyDirectory(const String &source, const String &dest)
Copy a directory to/from file system.
Lucene::FileUtils::removeFile
LPPAPI bool removeFile(const String &path)
Delete file from file system.
Lucene::FileUtils::fileExists
LPPAPI bool fileExists(const String &path)
Return true if given file or directory exists.
Lucene::FileUtils::fileModified
LPPAPI uint64_t fileModified(const String &path)
Return file last modified date and time.
Lucene::FileUtils::fileLength
LPPAPI int64_t fileLength(const String &path)
Return file length in bytes.
Lucene::FileUtils::extractFile
LPPAPI String extractFile(const String &path)
Extract file name from given path.
Lucene::FileUtils::copyFile
LPPAPI bool copyFile(const String &source, const String &dest)
Copy a file to/from file system.
Lucene::FileUtils::isDirectory
LPPAPI bool isDirectory(const String &path)
Return true if given path points to a directory.
Lucene::FileUtils::extractPath
LPPAPI String extractPath(const String &path)
Extract parent path from given path.
Lucene::FileUtils::listDirectory
LPPAPI bool listDirectory(const String &path, bool filesOnly, HashSet< String > dirList)
Return list of files (and/or directories) under given directory.
Lucene::FileUtils::joinPath
LPPAPI String joinPath(const String &path, const String &file)
Return complete path after joining given directory and file name.
Lucene::FileUtils::touchFile
LPPAPI bool touchFile(const String &path)
Set file last modified date and time to now.
Lucene::FileUtils::removeDirectory
LPPAPI bool removeDirectory(const String &path)
Delete directory from file system.
Lucene
Definition AbstractAllTermDocs.h:12

clucene.sourceforge.net