2012-04-25 20:13:17 +04:00
|
|
|
/*
|
|
|
|
grive: an GPL program to sync a local directory with Google Drive
|
|
|
|
Copyright (C) 2012 Wan Wai Ho
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
2012-04-26 19:40:38 +04:00
|
|
|
as published by the Free Software Foundation version 2
|
2012-04-26 08:21:40 +04:00
|
|
|
of the License.
|
2012-04-25 20:13:17 +04:00
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2012-05-14 19:32:22 +04:00
|
|
|
#include "Exception.hh"
|
2012-05-16 21:20:02 +04:00
|
|
|
#include "FileSystem.hh"
|
2012-05-14 19:32:22 +04:00
|
|
|
|
2012-04-25 20:13:17 +04:00
|
|
|
#include <string>
|
2012-04-27 06:49:33 +04:00
|
|
|
|
2012-04-27 11:41:46 +04:00
|
|
|
namespace gr {
|
2012-04-27 06:49:33 +04:00
|
|
|
|
2012-04-27 11:41:46 +04:00
|
|
|
class DateTime ;
|
2012-05-01 13:44:17 +04:00
|
|
|
class Path ;
|
2012-04-27 06:49:33 +04:00
|
|
|
|
2017-03-19 12:48:01 +03:00
|
|
|
enum FileType { FT_FILE = 1, FT_DIR = 2, FT_UNKNOWN = 3 } ;
|
|
|
|
|
2012-04-27 11:41:46 +04:00
|
|
|
namespace os
|
|
|
|
{
|
2012-05-14 19:32:22 +04:00
|
|
|
struct Error : virtual Exception {} ;
|
2012-05-01 13:44:17 +04:00
|
|
|
|
2017-03-19 12:48:01 +03:00
|
|
|
void Stat( const std::string& filename, DateTime *t, off64_t *size, FileType *ft ) ;
|
|
|
|
void Stat( const fs::path& filename, DateTime *t, off64_t *size, FileType *ft ) ;
|
2012-05-01 13:44:17 +04:00
|
|
|
|
2012-04-27 21:52:02 +04:00
|
|
|
void SetFileTime( const std::string& filename, const DateTime& t ) ;
|
2012-05-16 21:20:02 +04:00
|
|
|
void SetFileTime( const fs::path& filename, const DateTime& t ) ;
|
2012-07-19 20:50:40 +04:00
|
|
|
|
|
|
|
void Sleep( unsigned int sec ) ;
|
2012-04-27 11:41:46 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
} // end of namespaces
|