ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/DecentralizedMedia/Share.cpp
Revision: 534
Committed: 2005-06-29T23:01:02-07:00 (19 years, 11 months ago) by douglas
File size: 690 byte(s)
Log Message:
So long ext::String, we'll miss you, but not much we really still have you as cse::String. Also, other stuff.

File Contents

# Content
1 // Share
2 //
3 // Douglas Thrift
4 //
5 // $Id$
6
7 #include <menes/standard.hh>
8
9 #include "Share.hpp"
10
11 Share::Share(const _H<dbi::Connection>& connection, const api::Address& host, const cse::String& share) : connection(connection), host(host), share(share)
12 {
13 api::Path shares(_B("Shares"));
14
15 if (!shares.Exists())
16 shares.CreateDirectory();
17
18 api::Path host_(shares.GetRealPath().GetChild(/*lexical_cast<cse::String>(host)*/_B("192.168.1.8")));
19
20 if (!host_.Exists())
21 host_.CreateDirectory();
22
23 path = host_.GetChild(share);
24
25 if (!path.Exists())
26 path.CreateDirectory();
27 }
28
29 Share::~Share()
30 {
31 connection->Parse(_B("UPDATE files SET live = FALSE WHERE root = ?"))->Execute(path.GetPath());
32 }

Properties

Name Value
svn:eol-style native
svn:keywords Id