X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fbuilder%2Fbuilder-filesystem.h;h=bbb77d7aeec210b1c4dcd463b6712d1fb1537b2f;hb=7aa9e3d716396348b89c913b306bbc1ce201db69;hp=b3fa958b82d465418a1a5fe9c050776ccab1872b;hpb=e2eda444afbe82e9591fe198eef339227f90a616;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-toolkit/internal/builder/builder-filesystem.h b/dali-toolkit/internal/builder/builder-filesystem.h index b3fa958..bbb77d7 100644 --- a/dali-toolkit/internal/builder/builder-filesystem.h +++ b/dali-toolkit/internal/builder/builder-filesystem.h @@ -1,23 +1,28 @@ #ifndef __DALI_TOOLKIT_INTERNAL_BUILDER_FILESYSTEM_H__ #define __DALI_TOOLKIT_INTERNAL_BUILDER_FILESYSTEM_H__ -// -// Copyright (c) 2014 Samsung Electronics Co., Ltd. -// -// Licensed under the Flora License, Version 1.0 (the License); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://floralicense.org/license/ -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an AS IS BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// +/* + * Copyright (c) 2014 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ // EXTERNAL INCLUDES +#include +#include +#include + #include #include #include @@ -45,4 +50,10 @@ inline std::string ExePath(void) return std::string(buf); } +inline std::string GetFileContents(const std::string &fn) +{ + std::ifstream t(fn.c_str()); + return std::string((std::istreambuf_iterator(t)), std::istreambuf_iterator()); +} + #endif // __DALI_TOOLKIT_INTERNAL_BUILDER_FILESYSTEM_H__