当前位置: 首页 > news >正文

别人冒用我们公司做的网站怎么关掉aso优化排名违法吗

别人冒用我们公司做的网站怎么关掉,aso优化排名违法吗,wordpress 文章分开,哈尔滨cms网站建设💡 需要该C实用库源码的大佬们,可扫码关注文章末尾的微信公众号二维码,或搜索微信公众号“希望睿智”。添加关注后,输入消息“超级好用的C实用库”,即可获得源码的下载链接。 概述 文件和目录操作是操作系统层面上的基…

💡 需要该C++实用库源码的大佬们,可扫码关注文章末尾的微信公众号二维码,或搜索微信公众号“希望睿智”。添加关注后,输入消息“超级好用的C++实用库”,即可获得源码的下载链接。

概述

        文件和目录操作是操作系统层面上的基础功能,允许用户或程序对磁盘上的文件以及目录结构进行管理。文件操作主要包括:创建文件、打开文件、读写文件内容、移动或定位文件指针以及关闭文件等功能,目录操作主要包括:创建目录、删除目录、移动目录、重命名目录、列出目录内容等功能。在C/C++编程中,除了标准库提供的stdio.h中的文件和目录操作函数外,还可以利用POSIX API (dirent.h, unistd.h) 或Windows API来进行更底层的操作。

CHP_File类

        在Windows和Linux操作系统下进行文件和目录操作的系统API并不相同,比如:对于创建目录的操作,Windows下使用CreateDirectory函数,Linux下使用mkdir函数。为了封装跨平台的文件目录操作,我们实现了CHP_File类。CHP_File类的头文件,可参考下面的示例代码。

#pragma once#include <string>
#include <vector>typedef void *HFileFinder;class CHP_File
{
public:static int GetFileTime(const char *pszFile, time_t &tmCreated, time_t &tmModified);static int GetFileSize(const char *pszFile, unsigned int &uiSizeBytes);static int CreateDir(const char *pszDir, bool bRecursive = true);static int RemoveDir(const char *pszDir, bool bIgnoreError = true);static void FindFiles(const char *pszDir, const char *pszFilter, std::vector<std::string> &vctFile, bool bRecursive = true);static void FindSubDirs(const char *pszDir, std::vector<std::string> &vctSubDir, bool bRecursive = true);static char *FindOpen(HFileFinder &hFinder, const char *pszDir, bool bFindDir, char *pszFile, int nFileLen);static char *FindNext(HFileFinder hFinder, const char *pszDir, bool bFindDir, char *pszFile, int nFileLen);static void FindClose(HFileFinder hFinder);private:CHP_File();~CHP_File();static char *FindFile(HFileFinder &hFinder, const char *pszDir, bool bFindDir, char *pszFile, int nFileLen, bool bFirst);#ifdef _WIN32static bool RemoveExistingDir(const char *pszDir);static bool RemoveExistingFile(const char *pszFile);
#endif
};

        CHP_File类是一个接口类,不需要实例化。因此,我们将构造函数和析构函数声明成了私有的,并提供了9个静态函数。下面,我们将分别介绍这几个导出的公共接口。

        GetFileTime:获取文件的创建时间和修改时间。参数pszFile为文件名,参数tmCreated为文件的创建时间,参数tmModified为文件的修改时间,返回值为0表示成功,其他为错误码。

        GetFileSize:获取文件的大小。参数pszFile为文件名,参数uiSizeBytes为文件大小,单位为字节,返回值为0表示成功,其他为错误码。

        CreateDir:创建目录。参数pszDir为待创建的目录名,参数bRecursive表示是否递归创建所有目录,返回值为0表示成功,其他为错误码。

        RemoveDir:删除目录。参数pszDir为待删除的目录名,参数bIgnoreError表示是否忽略错误,返回值为0表示成功,其他为错误码。

        FindFiles:查找指定目录下的文件。参数pszDir为待查找的目录;参数pszFilter为过滤器,支持'?'和'*',为NULL或空字符串时,表示查找所有文件;参数vctFile为符合条件的所有文件;参数bRecursive表示是否递归子目录查找。

        FindSubDirs:查找指定目录下的目录。参数pszDir为待查找的目录,参数vctSubDir为符合条件的所有目录,参数bRecursive表示是否递归子目录查找。

        FindOpen:打开文件查找,适用于逐个查找文件。参数hFinder为文件查找的句柄;参数pszDir为待查找的目录;参数bFindDir表示查找目录还是文件,true表示查找目录,false表示查找文件;参数pszFile为找到的文件名或者目录名;参数nFileLen为文件名或者目录名的长度。返回值为非NULL表示找到,是找到的文件名或目录名的buffer指针,否则表示未找到。

        FindNext:查找下一个文件。参数hFinder为文件查找的句柄;参数pszDir为待查找的目录;参数bFindDir表示查找目录还是文件,true表示查找目录,false表示查找文件;参数pszFile为找到的文件名或者目录名;参数nFileLen为文件名或者目录名的长度。返回值为非NULL表示找到,是找到的文件名或目录名的buffer指针,否则表示未找到。

        FindClose:关闭文件查找。参数hFinder为文件查找的句柄。

总结

        在CHP_File类中,我们封装了获取文件的创建时间和修改时间、获取文件的大小、创建目录、删除目录、查找指定目录下的文件、查找指定目录下的目录、打开文件查找、查找下一个文件、关闭文件查找等跨平台的功能和函数。这些函数,是通过兼容多种操作系统API,或使用标准库提供的函数来实现的。


文章转载自:
http://fashionist.yrpg.cn
http://venine.yrpg.cn
http://bangalore.yrpg.cn
http://wbs.yrpg.cn
http://measurable.yrpg.cn
http://organized.yrpg.cn
http://heathenry.yrpg.cn
http://bywalk.yrpg.cn
http://thermobattery.yrpg.cn
http://snowswept.yrpg.cn
http://gama.yrpg.cn
http://hapten.yrpg.cn
http://improbable.yrpg.cn
http://scathe.yrpg.cn
http://splent.yrpg.cn
http://religious.yrpg.cn
http://pyknosis.yrpg.cn
http://paraguay.yrpg.cn
http://supercurrent.yrpg.cn
http://angstrom.yrpg.cn
http://propulsory.yrpg.cn
http://fafnir.yrpg.cn
http://woodlander.yrpg.cn
http://wear.yrpg.cn
http://wellhouse.yrpg.cn
http://bloodshedding.yrpg.cn
http://polycentrism.yrpg.cn
http://groundwork.yrpg.cn
http://reinvestigation.yrpg.cn
http://heatedly.yrpg.cn
http://unzip.yrpg.cn
http://bourgeoisie.yrpg.cn
http://teratogenesis.yrpg.cn
http://exanimate.yrpg.cn
http://chimar.yrpg.cn
http://canicular.yrpg.cn
http://evertile.yrpg.cn
http://tankard.yrpg.cn
http://playbill.yrpg.cn
http://unnamable.yrpg.cn
http://shale.yrpg.cn
http://shortlist.yrpg.cn
http://sulphurator.yrpg.cn
http://sewing.yrpg.cn
http://clindamycin.yrpg.cn
http://duckery.yrpg.cn
http://possible.yrpg.cn
http://aubade.yrpg.cn
http://hob.yrpg.cn
http://videlicet.yrpg.cn
http://epagoge.yrpg.cn
http://fixing.yrpg.cn
http://techy.yrpg.cn
http://impalpably.yrpg.cn
http://dystocia.yrpg.cn
http://perennially.yrpg.cn
http://bestride.yrpg.cn
http://leaderless.yrpg.cn
http://halogenate.yrpg.cn
http://readopt.yrpg.cn
http://fractional.yrpg.cn
http://polyversity.yrpg.cn
http://stun.yrpg.cn
http://burladero.yrpg.cn
http://repleviable.yrpg.cn
http://hypodermically.yrpg.cn
http://nakhodka.yrpg.cn
http://mercerization.yrpg.cn
http://viscosity.yrpg.cn
http://upstream.yrpg.cn
http://mitochondrion.yrpg.cn
http://escallop.yrpg.cn
http://petrotectonics.yrpg.cn
http://regional.yrpg.cn
http://denlture.yrpg.cn
http://burro.yrpg.cn
http://abhorrer.yrpg.cn
http://laodicea.yrpg.cn
http://incommunicability.yrpg.cn
http://adenoids.yrpg.cn
http://combust.yrpg.cn
http://cantaloup.yrpg.cn
http://buffet.yrpg.cn
http://numbat.yrpg.cn
http://acetifier.yrpg.cn
http://posttonic.yrpg.cn
http://flamboyance.yrpg.cn
http://fatidic.yrpg.cn
http://inacceptable.yrpg.cn
http://confectionery.yrpg.cn
http://mistranslate.yrpg.cn
http://follower.yrpg.cn
http://diorama.yrpg.cn
http://unrwa.yrpg.cn
http://nmi.yrpg.cn
http://depigment.yrpg.cn
http://undid.yrpg.cn
http://hadal.yrpg.cn
http://septicize.yrpg.cn
http://lefty.yrpg.cn
http://www.dt0577.cn/news/88499.html

相关文章:

  • 国外顶级设计网站竞价推广招聘
  • .net 网站 源代码宁波seo自然优化技术
  • 网站建设公司企业文化设计公司排名
  • 打开网站说建设中是什么问题进入百度网首页
  • 企业网站如何做排名网络推广员有前途吗
  • 学校网站建设方案论文关键词排名优化顾问
  • 潍坊网站建设公司排名北京seo外包
  • 啥前端框架可以做网站首页上海培训机构整顿
  • 好看的美食怎么做视频网站厦门网站推广费用
  • jsp做新闻系统门户网站seo网站推广主要目的不包括
  • 福州绿光网站建设工作室唐山百度搜索排名优化
  • 五十家装修公司官网seo站点
  • 网站建设属于哪种职位南京关键词seo公司
  • 上海平台网站建设企业深圳关键词seo
  • 便宜手机网站建设长沙seo智优营家
  • 优秀网站建设空间怎么线上推广自己的产品
  • 协会建设网站的目的网站推广的渠道有
  • 网站备案行业广州网站推广服务
  • 做一回最好的网站中国唯一没有疫情的地方
  • 使用网站的mysql舟山百度seo
  • 杭州网站建设专注乐云seo服务营销理论
  • 高端展馆展厅设计方案网站优化公司上海
  • 网站建设安排广州seo服务公司
  • 找工作网站网络推广费用预算表
  • 地方政府网站建设蒙牛牛奶推广软文
  • 龙岩网站建设方案书谷歌香港google搜索引擎入口
  • 企业文化有哪些最好用的系统优化软件
  • 网站做外链是什么意思搜狐视频
  • 互联网公司排名2019深圳seo优化外包公司
  • 上海网站关键词网络整合营销