Skip to content

Commit

Permalink
Deprecate SbDirectoryCreate
Browse files Browse the repository at this point in the history
b/302730696

Change-Id: Ic04e898809e7a7993db12ad9089cbe2d106b247d
  • Loading branch information
madhurajayaraman committed Jan 18, 2024
1 parent 1637d7b commit 38c83ad
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
32 changes: 32 additions & 0 deletions starboard/shared/win32/posix_emu/include/sys/stat.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Copyright 2023 The Cobalt Authors. All Rights Reserved.
//
// 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.

#ifndef STARBOARD_SHARED_WIN32_POSIX_EMU_INCLUDE_SYS_STAT_H_
#define STARBOARD_SHARED_WIN32_POSIX_EMU_INCLUDE_SYS_STAT_H_

#if defined(STARBOARD)

#ifdef __cplusplus
extern "C" {
#endif

int mkdir(const char* path, mode_t mode);

#ifdef __cplusplus
}
#endif // __cplusplus

#endif // defined(STARBOARD)

#endif // STARBOARD_SHARED_WIN32_POSIX_EMU_INCLUDE_SYS_STAT_H_
22 changes: 22 additions & 0 deletions starboard/shared/win32/posix_emu/stat.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright 2023 The Cobalt Authors. All Rights Reserved.
//
// 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.

#include <direct.h>
#include <sys/stat.h>

#include "starboard/types.h"

extern "C" int mkdir(const char* path, mode_t mode) {
return _mkdir(path);
}

0 comments on commit 38c83ad

Please sign in to comment.