开发者

Creating a folder on fileSystem dynamics ax

i need to check if a folder开发者_开发百科 exists in a particular location,if not then create that folder and save the appropriate file there.How can i acheive this using X++.

Please advice.


To check folder existence you can use WinApi::pathExists,
to create one WinApi::createDirectory or WinApi::createDirectoryPath:

str  path = 'C:\\tmp\\aFolder';
;
if (!WinApi::pathExists(path))
{
    WinApi::createDirectoryPath(path);
}

I have no idea what is meant by "the appropriate file", but have a look at the TextIO, BinaryIO or the other *IO classes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜