2025-08-10 02:45:57 +00:00
|
|
|
|
//! FileBox 📁 - ファイルI/O(PathBox/DirBoxとセット)
|
|
|
|
|
|
// Nyashの箱システムによるファイル入出力を提供します。
|
|
|
|
|
|
// 参考: 既存Boxの設計思想
|
|
|
|
|
|
|
2025-11-08 15:13:22 +09:00
|
|
|
|
// SSOT provider design (ring‑0/1) — modules are currently placeholders
|
|
|
|
|
|
pub mod provider; // trait FileIo / FileCaps / FileError
|
|
|
|
|
|
pub mod core_ro; // Core read‑only provider
|
|
|
|
|
|
pub mod box_shim; // Thin delegating shim
|
2025-11-08 17:04:21 +09:00
|
|
|
|
pub mod builtin_factory; // Builtin FileBox ProviderFactory
|
2025-11-08 15:13:22 +09:00
|
|
|
|
|
2025-09-17 07:43:07 +09:00
|
|
|
|
use crate::box_trait::{BoolBox, BoxBase, BoxCore, NyashBox, StringBox};
|
2025-11-08 15:13:22 +09:00
|
|
|
|
use crate::runtime::provider_lock;
|
2025-08-10 03:21:24 +00:00
|
|
|
|
use std::any::Any;
|
2025-11-08 15:13:22 +09:00
|
|
|
|
use std::sync::Arc;
|
|
|
|
|
|
|
|
|
|
|
|
use self::provider::FileIo;
|
2025-08-10 02:45:57 +00:00
|
|
|
|
|
|
|
|
|
|
pub struct FileBox {
|
2025-11-08 15:13:22 +09:00
|
|
|
|
provider: Option<Arc<dyn FileIo>>,
|
2025-08-15 01:21:37 +00:00
|
|
|
|
path: String,
|
2025-08-11 11:45:34 +09:00
|
|
|
|
base: BoxBase,
|
2025-08-10 02:45:57 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-11-08 15:13:22 +09:00
|
|
|
|
impl std::fmt::Debug for FileBox {
|
|
|
|
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
|
|
|
|
f.debug_struct("FileBox")
|
|
|
|
|
|
.field("path", &self.path)
|
|
|
|
|
|
.field("provider", &"<FileIo>")
|
|
|
|
|
|
.finish()
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-15 01:21:37 +00:00
|
|
|
|
impl Clone for FileBox {
|
|
|
|
|
|
fn clone(&self) -> Self {
|
2025-11-08 15:13:22 +09:00
|
|
|
|
// Clone by copying provider reference and path
|
|
|
|
|
|
FileBox {
|
|
|
|
|
|
provider: self.provider.clone(),
|
|
|
|
|
|
path: self.path.clone(),
|
|
|
|
|
|
base: BoxBase::new(),
|
2025-08-15 01:21:37 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-10 02:45:57 +00:00
|
|
|
|
impl FileBox {
|
2025-08-11 15:01:11 +09:00
|
|
|
|
pub fn new() -> Self {
|
2025-11-08 15:13:22 +09:00
|
|
|
|
FileBox {
|
|
|
|
|
|
provider: provider_lock::get_filebox_provider().cloned(),
|
|
|
|
|
|
path: String::new(),
|
|
|
|
|
|
base: BoxBase::new(),
|
2025-08-11 15:01:11 +09:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-09-17 07:43:07 +09:00
|
|
|
|
|
2025-11-08 17:04:21 +09:00
|
|
|
|
/// Create FileBox with explicit provider (for builtin fallback)
|
|
|
|
|
|
pub fn with_provider(provider: Arc<dyn FileIo>) -> Self {
|
|
|
|
|
|
FileBox {
|
|
|
|
|
|
provider: Some(provider),
|
|
|
|
|
|
path: String::new(),
|
|
|
|
|
|
base: BoxBase::new(),
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2025-11-08 15:13:22 +09:00
|
|
|
|
pub fn open(path: &str) -> Result<Self, String> {
|
|
|
|
|
|
let provider = provider_lock::get_filebox_provider()
|
|
|
|
|
|
.ok_or("FileBox provider not initialized")?
|
|
|
|
|
|
.clone();
|
|
|
|
|
|
|
|
|
|
|
|
provider.open(path)
|
|
|
|
|
|
.map_err(|e| format!("Failed to open: {}", e))?;
|
|
|
|
|
|
|
2025-09-17 07:43:07 +09:00
|
|
|
|
Ok(FileBox {
|
2025-11-08 15:13:22 +09:00
|
|
|
|
provider: Some(provider),
|
2025-08-15 01:21:37 +00:00
|
|
|
|
path: path.to_string(),
|
2025-08-11 11:45:34 +09:00
|
|
|
|
base: BoxBase::new(),
|
2025-08-10 03:21:24 +00:00
|
|
|
|
})
|
2025-08-10 02:45:57 +00:00
|
|
|
|
}
|
2025-09-17 07:43:07 +09:00
|
|
|
|
|
2025-11-08 15:13:22 +09:00
|
|
|
|
pub fn read_to_string(&self) -> Result<String, String> {
|
|
|
|
|
|
if let Some(ref provider) = self.provider {
|
|
|
|
|
|
provider.read()
|
|
|
|
|
|
.map_err(|e| format!("Read failed: {}", e))
|
|
|
|
|
|
} else {
|
|
|
|
|
|
Err("No provider available".to_string())
|
|
|
|
|
|
}
|
2025-08-10 02:45:57 +00:00
|
|
|
|
}
|
2025-09-17 07:43:07 +09:00
|
|
|
|
|
2025-11-08 15:13:22 +09:00
|
|
|
|
pub fn write_all(&self, _buf: &[u8]) -> Result<(), String> {
|
|
|
|
|
|
// CoreRo does not support write - Fail-Fast
|
|
|
|
|
|
Err("Write operation not supported in read-only mode".to_string())
|
🔧 refactor: すべてのBoxをArc<Mutex>パターンで統一
CopilotのBox実装を私たちのArc<Mutex>パターンで統一:
- BufferBox: Arc<Mutex<Vec<u8>>>で内部可変性を実現
- FileBox: Arc<Mutex<File>>でファイルハンドル管理
- JSONBox: Arc<Mutex<Value>>でJSON値を保持
- HttpClientBox: Arc<Mutex<Client>>でHTTPクライアント管理
- StreamBox: Arc<Mutex>でストリームバッファと位置を管理
- RegexBox: Arc<Regex>で軽量ラッパー実装
各Boxに実用的なメソッドも追加:
- BufferBox: write, read, readAll, clear, length, append, slice
- FileBox: read, write, exists, delete, copy
- JSONBox: parse, stringify, get, set, has, keys
- HttpClientBox: get, post, put, delete, request
- StreamBox: write, read, position, length, reset
- RegexBox: test, find, findAll, replace, split
interpreterに新Box用のメソッド実行を追加:
- data_methods.rs: BufferBox, JSONBox, RegexBox
- network_methods.rs: HttpClientBox, StreamBox
これでコードベース全体が一貫性のあるArc<Mutex>パターンで統一されました!
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-10 13:03:42 +09:00
|
|
|
|
}
|
2025-09-17 07:43:07 +09:00
|
|
|
|
|
🔧 refactor: すべてのBoxをArc<Mutex>パターンで統一
CopilotのBox実装を私たちのArc<Mutex>パターンで統一:
- BufferBox: Arc<Mutex<Vec<u8>>>で内部可変性を実現
- FileBox: Arc<Mutex<File>>でファイルハンドル管理
- JSONBox: Arc<Mutex<Value>>でJSON値を保持
- HttpClientBox: Arc<Mutex<Client>>でHTTPクライアント管理
- StreamBox: Arc<Mutex>でストリームバッファと位置を管理
- RegexBox: Arc<Regex>で軽量ラッパー実装
各Boxに実用的なメソッドも追加:
- BufferBox: write, read, readAll, clear, length, append, slice
- FileBox: read, write, exists, delete, copy
- JSONBox: parse, stringify, get, set, has, keys
- HttpClientBox: get, post, put, delete, request
- StreamBox: write, read, position, length, reset
- RegexBox: test, find, findAll, replace, split
interpreterに新Box用のメソッド実行を追加:
- data_methods.rs: BufferBox, JSONBox, RegexBox
- network_methods.rs: HttpClientBox, StreamBox
これでコードベース全体が一貫性のあるArc<Mutex>パターンで統一されました!
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-10 13:03:42 +09:00
|
|
|
|
/// ファイルの内容を読み取る
|
|
|
|
|
|
pub fn read(&self) -> Box<dyn NyashBox> {
|
|
|
|
|
|
match self.read_to_string() {
|
|
|
|
|
|
Ok(content) => Box::new(StringBox::new(&content)),
|
|
|
|
|
|
Err(e) => Box::new(StringBox::new(&format!("Error reading file: {}", e))),
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-09-17 07:43:07 +09:00
|
|
|
|
|
🔧 refactor: すべてのBoxをArc<Mutex>パターンで統一
CopilotのBox実装を私たちのArc<Mutex>パターンで統一:
- BufferBox: Arc<Mutex<Vec<u8>>>で内部可変性を実現
- FileBox: Arc<Mutex<File>>でファイルハンドル管理
- JSONBox: Arc<Mutex<Value>>でJSON値を保持
- HttpClientBox: Arc<Mutex<Client>>でHTTPクライアント管理
- StreamBox: Arc<Mutex>でストリームバッファと位置を管理
- RegexBox: Arc<Regex>で軽量ラッパー実装
各Boxに実用的なメソッドも追加:
- BufferBox: write, read, readAll, clear, length, append, slice
- FileBox: read, write, exists, delete, copy
- JSONBox: parse, stringify, get, set, has, keys
- HttpClientBox: get, post, put, delete, request
- StreamBox: write, read, position, length, reset
- RegexBox: test, find, findAll, replace, split
interpreterに新Box用のメソッド実行を追加:
- data_methods.rs: BufferBox, JSONBox, RegexBox
- network_methods.rs: HttpClientBox, StreamBox
これでコードベース全体が一貫性のあるArc<Mutex>パターンで統一されました!
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-10 13:03:42 +09:00
|
|
|
|
/// ファイルに内容を書き込む
|
2025-11-08 15:13:22 +09:00
|
|
|
|
pub fn write(&self, _content: Box<dyn NyashBox>) -> Box<dyn NyashBox> {
|
|
|
|
|
|
// Fail-Fast: CoreRo does not support write
|
|
|
|
|
|
Box::new(StringBox::new("Error: Write operation not supported in read-only mode"))
|
🔧 refactor: すべてのBoxをArc<Mutex>パターンで統一
CopilotのBox実装を私たちのArc<Mutex>パターンで統一:
- BufferBox: Arc<Mutex<Vec<u8>>>で内部可変性を実現
- FileBox: Arc<Mutex<File>>でファイルハンドル管理
- JSONBox: Arc<Mutex<Value>>でJSON値を保持
- HttpClientBox: Arc<Mutex<Client>>でHTTPクライアント管理
- StreamBox: Arc<Mutex>でストリームバッファと位置を管理
- RegexBox: Arc<Regex>で軽量ラッパー実装
各Boxに実用的なメソッドも追加:
- BufferBox: write, read, readAll, clear, length, append, slice
- FileBox: read, write, exists, delete, copy
- JSONBox: parse, stringify, get, set, has, keys
- HttpClientBox: get, post, put, delete, request
- StreamBox: write, read, position, length, reset
- RegexBox: test, find, findAll, replace, split
interpreterに新Box用のメソッド実行を追加:
- data_methods.rs: BufferBox, JSONBox, RegexBox
- network_methods.rs: HttpClientBox, StreamBox
これでコードベース全体が一貫性のあるArc<Mutex>パターンで統一されました!
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-10 13:03:42 +09:00
|
|
|
|
}
|
2025-09-17 07:43:07 +09:00
|
|
|
|
|
🔧 refactor: すべてのBoxをArc<Mutex>パターンで統一
CopilotのBox実装を私たちのArc<Mutex>パターンで統一:
- BufferBox: Arc<Mutex<Vec<u8>>>で内部可変性を実現
- FileBox: Arc<Mutex<File>>でファイルハンドル管理
- JSONBox: Arc<Mutex<Value>>でJSON値を保持
- HttpClientBox: Arc<Mutex<Client>>でHTTPクライアント管理
- StreamBox: Arc<Mutex>でストリームバッファと位置を管理
- RegexBox: Arc<Regex>で軽量ラッパー実装
各Boxに実用的なメソッドも追加:
- BufferBox: write, read, readAll, clear, length, append, slice
- FileBox: read, write, exists, delete, copy
- JSONBox: parse, stringify, get, set, has, keys
- HttpClientBox: get, post, put, delete, request
- StreamBox: write, read, position, length, reset
- RegexBox: test, find, findAll, replace, split
interpreterに新Box用のメソッド実行を追加:
- data_methods.rs: BufferBox, JSONBox, RegexBox
- network_methods.rs: HttpClientBox, StreamBox
これでコードベース全体が一貫性のあるArc<Mutex>パターンで統一されました!
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-10 13:03:42 +09:00
|
|
|
|
/// ファイルが存在するかチェック
|
|
|
|
|
|
pub fn exists(&self) -> Box<dyn NyashBox> {
|
|
|
|
|
|
use std::path::Path;
|
2025-08-15 01:21:37 +00:00
|
|
|
|
Box::new(BoolBox::new(Path::new(&self.path).exists()))
|
🔧 refactor: すべてのBoxをArc<Mutex>パターンで統一
CopilotのBox実装を私たちのArc<Mutex>パターンで統一:
- BufferBox: Arc<Mutex<Vec<u8>>>で内部可変性を実現
- FileBox: Arc<Mutex<File>>でファイルハンドル管理
- JSONBox: Arc<Mutex<Value>>でJSON値を保持
- HttpClientBox: Arc<Mutex<Client>>でHTTPクライアント管理
- StreamBox: Arc<Mutex>でストリームバッファと位置を管理
- RegexBox: Arc<Regex>で軽量ラッパー実装
各Boxに実用的なメソッドも追加:
- BufferBox: write, read, readAll, clear, length, append, slice
- FileBox: read, write, exists, delete, copy
- JSONBox: parse, stringify, get, set, has, keys
- HttpClientBox: get, post, put, delete, request
- StreamBox: write, read, position, length, reset
- RegexBox: test, find, findAll, replace, split
interpreterに新Box用のメソッド実行を追加:
- data_methods.rs: BufferBox, JSONBox, RegexBox
- network_methods.rs: HttpClientBox, StreamBox
これでコードベース全体が一貫性のあるArc<Mutex>パターンで統一されました!
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-10 13:03:42 +09:00
|
|
|
|
}
|
2025-09-17 07:43:07 +09:00
|
|
|
|
|
🔧 refactor: すべてのBoxをArc<Mutex>パターンで統一
CopilotのBox実装を私たちのArc<Mutex>パターンで統一:
- BufferBox: Arc<Mutex<Vec<u8>>>で内部可変性を実現
- FileBox: Arc<Mutex<File>>でファイルハンドル管理
- JSONBox: Arc<Mutex<Value>>でJSON値を保持
- HttpClientBox: Arc<Mutex<Client>>でHTTPクライアント管理
- StreamBox: Arc<Mutex>でストリームバッファと位置を管理
- RegexBox: Arc<Regex>で軽量ラッパー実装
各Boxに実用的なメソッドも追加:
- BufferBox: write, read, readAll, clear, length, append, slice
- FileBox: read, write, exists, delete, copy
- JSONBox: parse, stringify, get, set, has, keys
- HttpClientBox: get, post, put, delete, request
- StreamBox: write, read, position, length, reset
- RegexBox: test, find, findAll, replace, split
interpreterに新Box用のメソッド実行を追加:
- data_methods.rs: BufferBox, JSONBox, RegexBox
- network_methods.rs: HttpClientBox, StreamBox
これでコードベース全体が一貫性のあるArc<Mutex>パターンで統一されました!
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-10 13:03:42 +09:00
|
|
|
|
/// ファイルを削除
|
|
|
|
|
|
pub fn delete(&self) -> Box<dyn NyashBox> {
|
2025-11-08 15:13:22 +09:00
|
|
|
|
// Fail-Fast: CoreRo does not support delete
|
|
|
|
|
|
Box::new(StringBox::new("Error: Delete operation not supported in read-only mode"))
|
🔧 refactor: すべてのBoxをArc<Mutex>パターンで統一
CopilotのBox実装を私たちのArc<Mutex>パターンで統一:
- BufferBox: Arc<Mutex<Vec<u8>>>で内部可変性を実現
- FileBox: Arc<Mutex<File>>でファイルハンドル管理
- JSONBox: Arc<Mutex<Value>>でJSON値を保持
- HttpClientBox: Arc<Mutex<Client>>でHTTPクライアント管理
- StreamBox: Arc<Mutex>でストリームバッファと位置を管理
- RegexBox: Arc<Regex>で軽量ラッパー実装
各Boxに実用的なメソッドも追加:
- BufferBox: write, read, readAll, clear, length, append, slice
- FileBox: read, write, exists, delete, copy
- JSONBox: parse, stringify, get, set, has, keys
- HttpClientBox: get, post, put, delete, request
- StreamBox: write, read, position, length, reset
- RegexBox: test, find, findAll, replace, split
interpreterに新Box用のメソッド実行を追加:
- data_methods.rs: BufferBox, JSONBox, RegexBox
- network_methods.rs: HttpClientBox, StreamBox
これでコードベース全体が一貫性のあるArc<Mutex>パターンで統一されました!
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-10 13:03:42 +09:00
|
|
|
|
}
|
2025-09-17 07:43:07 +09:00
|
|
|
|
|
🔧 refactor: すべてのBoxをArc<Mutex>パターンで統一
CopilotのBox実装を私たちのArc<Mutex>パターンで統一:
- BufferBox: Arc<Mutex<Vec<u8>>>で内部可変性を実現
- FileBox: Arc<Mutex<File>>でファイルハンドル管理
- JSONBox: Arc<Mutex<Value>>でJSON値を保持
- HttpClientBox: Arc<Mutex<Client>>でHTTPクライアント管理
- StreamBox: Arc<Mutex>でストリームバッファと位置を管理
- RegexBox: Arc<Regex>で軽量ラッパー実装
各Boxに実用的なメソッドも追加:
- BufferBox: write, read, readAll, clear, length, append, slice
- FileBox: read, write, exists, delete, copy
- JSONBox: parse, stringify, get, set, has, keys
- HttpClientBox: get, post, put, delete, request
- StreamBox: write, read, position, length, reset
- RegexBox: test, find, findAll, replace, split
interpreterに新Box用のメソッド実行を追加:
- data_methods.rs: BufferBox, JSONBox, RegexBox
- network_methods.rs: HttpClientBox, StreamBox
これでコードベース全体が一貫性のあるArc<Mutex>パターンで統一されました!
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-10 13:03:42 +09:00
|
|
|
|
/// ファイルをコピー
|
2025-11-08 15:13:22 +09:00
|
|
|
|
pub fn copy(&self, _dest: &str) -> Box<dyn NyashBox> {
|
|
|
|
|
|
// Fail-Fast: CoreRo does not support copy
|
|
|
|
|
|
Box::new(StringBox::new("Error: Copy operation not supported in read-only mode"))
|
2025-08-10 02:45:57 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-08-10 03:21:24 +00:00
|
|
|
|
|
2025-08-11 11:45:34 +09:00
|
|
|
|
impl BoxCore for FileBox {
|
|
|
|
|
|
fn box_id(&self) -> u64 {
|
|
|
|
|
|
self.base.id
|
|
|
|
|
|
}
|
2025-09-17 07:43:07 +09:00
|
|
|
|
|
2025-08-11 15:01:11 +09:00
|
|
|
|
fn parent_type_id(&self) -> Option<std::any::TypeId> {
|
|
|
|
|
|
self.base.parent_type_id
|
|
|
|
|
|
}
|
2025-09-17 07:43:07 +09:00
|
|
|
|
|
2025-08-11 11:45:34 +09:00
|
|
|
|
fn fmt_box(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
|
|
|
|
|
write!(f, "FileBox({})", self.path)
|
|
|
|
|
|
}
|
2025-09-17 07:43:07 +09:00
|
|
|
|
|
2025-08-11 15:01:11 +09:00
|
|
|
|
fn as_any(&self) -> &dyn Any {
|
|
|
|
|
|
self
|
|
|
|
|
|
}
|
2025-09-17 07:43:07 +09:00
|
|
|
|
|
2025-08-11 15:01:11 +09:00
|
|
|
|
fn as_any_mut(&mut self) -> &mut dyn Any {
|
|
|
|
|
|
self
|
|
|
|
|
|
}
|
2025-08-11 11:45:34 +09:00
|
|
|
|
}
|
|
|
|
|
|
|
2025-08-10 03:21:24 +00:00
|
|
|
|
impl NyashBox for FileBox {
|
|
|
|
|
|
fn clone_box(&self) -> Box<dyn NyashBox> {
|
2025-11-08 15:13:22 +09:00
|
|
|
|
// Clone by copying provider and path reference
|
|
|
|
|
|
Box::new(self.clone())
|
2025-08-10 03:21:24 +00:00
|
|
|
|
}
|
2025-09-17 07:43:07 +09:00
|
|
|
|
|
2025-08-15 14:29:47 +09:00
|
|
|
|
/// 仮実装: clone_boxと同じ(後で修正)
|
|
|
|
|
|
fn share_box(&self) -> Box<dyn NyashBox> {
|
|
|
|
|
|
self.clone_box()
|
|
|
|
|
|
}
|
2025-08-10 03:21:24 +00:00
|
|
|
|
|
|
|
|
|
|
fn to_string_box(&self) -> StringBox {
|
|
|
|
|
|
StringBox::new(format!("FileBox({})", self.path))
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn type_name(&self) -> &'static str {
|
|
|
|
|
|
"FileBox"
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn equals(&self, other: &dyn NyashBox) -> BoolBox {
|
|
|
|
|
|
if let Some(other_file) = other.as_any().downcast_ref::<FileBox>() {
|
2025-08-15 01:21:37 +00:00
|
|
|
|
BoolBox::new(self.path == other_file.path)
|
2025-08-10 03:21:24 +00:00
|
|
|
|
} else {
|
|
|
|
|
|
BoolBox::new(false)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-08-11 11:45:34 +09:00
|
|
|
|
|
|
|
|
|
|
impl std::fmt::Display for FileBox {
|
|
|
|
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
|
|
|
|
self.fmt_box(f)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|